Tableau-度量值的计数和百分比 [英] Tableau - Both count and Percentage in Measure Values

查看:173
本文介绍了Tableau-度量值的计数和百分比的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我得到了一张包含2个度量值的堆叠条的表,如上图所示(不是我的,而是类似的).

I got a sheet that contain stacked bars of 2 measure values like the picture above(It's not mine but it's similar).

我的问题是,是否有办法显示每个堆叠条形的数量和百分比.我的数据如下图所示.

My question is, if there is any way to show both count and percentage of each stacked bar. My data looks like picture below.

提前谢谢!

推荐答案

将数据导入到Tableau中时不会导入total列(此处多余).通过发布数据,您可以清楚地看到数据重塑问题.继续这样-

While importing data into tableau don't import total column (it is redundant here). By posting your data you have made it clear that you have data reshaping issue. Proceed like this-

第1步 (在导入/连接到工作表时),依次单击app1和app2列,然后分别对它们进行 pivot .截图

根据喜好重命名这些字段.我已将它们分别重命名为 app name val .

Rename these fields as per taste. I have re-named these as app name and val respectively.

步骤2 创建一个计算字段为

{FIXED [App name]: sum([val])}/{sum([val])}

并构建这样的视图.(将calculation1格式化为百分比)

and build a view like this. (Format calculation1 as percentage)

祝你好运.

这篇关于Tableau-度量值的计数和百分比的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆