Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Show Percents in Pie Chart

How do you get the percentages to show in a pie chart. Each time I try to show the expression in the Number tab, clik show as percent, the output is the whole number (45,320.00%) with a percent sign. How do you get it to display the percent the slice of the pie represents?

15 Replies
kji
Employee
Employee

On the Expressions tab, check "Relative" for your expression.

Not applicable
Author

That worked like a charm. Now, is there a way to have the label be present in the pie chart (not the legend) ?

boorgura
Specialist
Specialist

what do you mean by a label in chart??

Not applicable
Author

Hi

See attached example, the trick is to add more dimensions but make them invisible so they are not added as slices, then click on "show value on data point" so that they do show next to the exsiting slices.

Hope it helps,

Not applicable
Author

The field name in the axis that the pie slice represents. If 27% of the Pie is represented by Red Pens, the I would like a label in the pie chart representing to read Red Pens either in place of or together with field value.

Not applicable
Author

Try 'Value on data points'

Thanks

BR.

Not applicable
Author

Hi, This is exactly what I was looking for. Thanks.

2 questions:

     1. In a pie chart the "invisible" option is disabled by me (I copied your Object and it worked fine, but i cannot recreate it myself)

     2. The "Other" legend is showing the first Expression only.

any Idea's?

Thanks for your time.

Anonymous
Not applicable
Author

To add labes, you can place a dimension name inside an expression, and then join it by & :
=[Your_Dimension] & ' '& Your_Calculation

When you cannot see it, you should either change  Number Format Settings to "Expression default" or uncheck Relative tab and instead make percentage as a calculation inside your expression (it is just a dividing to show the same value as Relative do). You can try:

=[Your_Dimension]& ' ' &num( (sum [Your_Measure])*100 / sum(TOTAL [Your_Measure]) ), '#.##0,00' ) & ' %'

1) num function lets you format the number

2) TOTAL lets you sum across all your dimensions up (not only one dimension)

3) & joins different types of data (here: numbers and string)

4) ' %' simply adds % in the end of you calculation

Best regards,

Michał

Not applicable
Author

i dont know, if i do this. my back ground color of expression is coming to the color of other expression, but i am not getting my percentage displayed.

Pls reply

Thank you