简体   繁体   中英

Tableau - Both count and Percentage in Measure Values

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.

数据

Thank you in advance!

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-

Step-1 While importing/connecting to worksheet, click app1 and app2 columns and then pivot them both. screenshot

在此处输入图片说明

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

Step-2 Create a calculated field as

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

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

在此处输入图片说明

Good Luck.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM