计算列的百分比
我已经将Excel表加载到Tableau:
file_name,类别
A,CCCCC
A,CCCCC
B,CCCCC B,CCCCC
C,EEEEE
D,EEEEE D,EEEEE
E,EEEEE E,wwww
f,wwww f,wwww
我需要计算:类别CCCCC中的文件是多少百分比?
在此示例中,有6个不同的文件(a,b,c,d,e,f)。其中两个是CCCCC类别(即文件A,B)。因此,CCCCC类别中的文件的百分比为:2 OUT 6,即33%。
如何计算此百分比并在Tableau上显示?谢谢你!
I have loaded an Excel sheet into Tableau:
File_name, Category
A, CCCCC
A, CCCCC
B, CCCCC
C, EEEEE
D, EEEEE
E, WWWW
F, WWWW
I need to calculate: what percentage of Files are in Category CCCCC?
In this example, there are 6 distinct files (A, B, C, D, E, F). Two of them are in Category CCCCC (i.e. File A, B). Hence, the percentage of Files that are in Category CCCCC are: 2 out 6, i.e. 33%.
How do I calculate this percentage and display it on Tableau? Thank you!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
第一个拖动类别,然后将文件名变成行。稍后右键单击文件名,然后选择“计数”(计数不同)-Step1,然后更改为离散 - 步骤2。现在,再次单击并选择快速表计算(总数的百分比) - 步骤3,然后我们可以看到跨如下的百分比-
First drag category and then File Name to rows. Later right click on File name and choose measure (count distinct)-Step1 and change to discrete- Step 2. Now, again right click and choose Quick table calculation (Percentage of total) - Step3, then we can see the percentage across as below -