计算列的百分比

发布于 2025-01-21 15:29:26 字数 344 浏览 3 评论 0原文

我已经将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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

嘴硬脾气大 2025-01-28 15:29:26

第一个拖动类别,然后将文件名变成行。稍后右键单击文件名,然后选择“计数”(计数不同)-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 -

enter image description here

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文