Is it possible to display percentage and count together?

百般思念 提交于 2019-12-12 04:13:49

问题


I have created a 100.00% stacked bar chart in Tableau, and I want to know if I can show the total count of entries within each category next to the percentage that is listed.

This is what I currently have:

And this is what I want:

_____________________________________________
|______66.66% (666)______|___33.33% (333)___|

Is this possbile?


回答1:


Yes, drag your measure to the text shelf and set it a percent of total like you have done in columns. Place the same measure again in the text shelf. Click the Label button and you can edit the label as follows

<% of Total SUM(Quantity)> (<SUM(Quantity)>)

See sample workbook here: https://www.dropbox.com/s/gn8hfazwvp80ad1/170726%20stack%20question.twbx?dl=0




回答2:


I think solution that will work in your situation is to copy Number of Records and call it Number of Records Percentage. Then change number format to Percentage (right click / number format / percentage). Then you will have two fields - Number of Records generated automatically, and yours copy Number of Records Percentage. Then put both to Labels. For both fields you can set different table calculations.



来源:https://stackoverflow.com/questions/45327211/is-it-possible-to-display-percentage-and-count-together

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!