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

View actual values and percentages in a pie chart

Hi everyone,

Is there a way I can see actual values AND percentages in a pie chart, eg have the actual values in the legend and the calculated percentages on the actual pie?

TIA,

Tony

1 Solution

Accepted Solutions
Not applicable
Author

Hi,

Use 2 expressions in the same pie:

1) actual values

2) percentage (with flag "values on data point")

The legend show only first expression values.

Alex

View solution in original post

10 Replies
Not applicable
Author

Hi Tony,

View this link http://qliktips.blogspot.com/2009/09/more-on-dual.html regarding dual function.

Alex

Not applicable
Author

Hi Alex,

Thanks for that, it's useful, but it's still not quite what I'm after. The numbers I have are quite large (in the millions), so I really just wanted to show only the actual number in the legend, and only the percentage on the pie chart. If I show legend + percentage + actual number on the chart it just takes up too much space.

Also, I don't know if it's just me, but sometimes I come across things that I thought would be easy but I just can't seem to figure them out. In this example I have a table and I'm trying to display the count of records (grouped by Transaction Code and Currency) as a % of the total count of records. But I can't even do this! So in my table I have, for example, 10 records:

TCode CCY Value

AA USD 1.5

AA USD 2.0

AA EUR 1.5

AA EUR 3.0

AA EUR 1.2

AB GBP 2.4

AB EUR 8.5

AB USD 0.6

AB USD 2.1

AB USD 4.2

And I want to see:

TCODE CCY Count %

AA USD 2 20%

AA EUR 3 30%

AB GBP 1 10%

AB EUR 1 10%

AB USD 3 30%

but this seems beyond me. Huh? I've got the Count, but I thought I could do the % by doing:

Count(CCY) / Sum(Count(CCY))

but it seems I'm not thinking in QlikView-mode as this just returns '-'.

Any ideas?

Thanks,

Tony

Not applicable
Author

Hi,

Use 2 expressions in the same pie:

1) actual values

2) percentage (with flag "values on data point")

The legend show only first expression values.

Alex

Not applicable
Author

Hi Tony,

for the second question, try count(CCY)/Count(TOTAL CCY)

Alex

Not applicable
Author

Inregards to the second question:

I believe you could also just copy the first formula into a second formula, and use the 'relative' checkbox.

Not applicable
Author

Thanks Alex, that work well, apart from one thing - the 'Others' slice of the pie still shows the number, not the percentage:

Look a little odd, doesn't it? Any ideas on this one?

Thanks v much,

Tony

Not applicable
Author

Hi Tony -- I'm running into the same thing with the "Other" pie slice.  Did this ever get figured out?

Not applicable
Author

Hi -- did it ever get figured out why the "Other" pie slice won't show the percentage value?

Not applicable
Author

I was able to get a % label on the Other slice by checking "relative" on both the actual expression, and the copy of the expression being used as "Values on Data Points."