问题
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