如何在Tableau中为堆叠图形添加分母计数(总销售额)

问题描述 投票:0回答:1

我已经使用tableau为以下数据构建了条形图。如何在表格中每个栏的顶部添加总销售额(120,150,200,180,140)

   [The following image has the data and bar graph that I was trying to build]
    [1]: https://i.stack.imgur.com/NdA7s.png

感谢您的帮助

graph tableau
1个回答
0
投票

希望这会有所帮助。

我首先进行数据透视,以通过使用单个度量来简化数据。转到数据选项卡,然后选择Sale ASale B度量:

measures selected

然后点击下拉菜单,然后选择数据透视。

pivot

然后您的数据将如下所示

enter image description here

[下一步,您要像这样设置字段,以使其反映您的屏幕截图。

original

SUM(Pivot Field Values)是设置为percent of total的表计算。table down

然后只需按住enter image description here并拖动到Ctrl,即可复制您的测量。在Rows部分中使其成为标签。这将添加总数。您只需要使用轴和格式即可将其从此处移至所需位置。

Marks

© www.soinside.com 2019 - 2024. All rights reserved.