Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to create special pie chart?

I have following data:
Category PartA PartB PartC
A 5 3 2
A 10 4 1
A 3 6 11
A 2 4 8
B 3 0 2
B 5 1 4
C 6 4 2
C 2 0 1

if I select in QlikView sheet (in object ListBox LB01) value "A"
I want create pie chart which display ratio of PartA, PartB and PartC on summary data of "A".
In this case it will be pie chart consists of three parts - first slice will have value of 20 (result of PartA values: 5+10+3+2)
second will have value of 17 (3+4+6+4) and third slice will be value of 22 (2+1+11+8).
Whole of pie will be value of 59 (result of all PartA values, PartB values and PartC values).

Or if I select value "B", pie chart will be three parts. First=8 (3+5), second=1 (0+1), third=6 (2+4)

How can I create that pie chart?

thanks

12 Replies
Not applicable
Author

Which version do you use?

If 9 or higher, you can use a Trellis Option.....and show 3 graphs....each category.....

....or with you prefer you can put a IF on your expression...

look on the help about GetSelectField.....is helpfull

mike_garcia
Luminary Alumni
Luminary Alumni

If I understood correctly, you can solve it by creating a Pie Chart with no dimensions and three expressions. Sum(PartA), Sum(PartB) and Sum(PartC).

Hope this helps.

Mike.

Miguel García
Qlik Expert, Author and Trainer
jedgson
Creator
Creator

You can create a Pie chart with no dimensions, and then create 3 expressions:

1 - Sum(PartA)

2 - Sum(PartB)

3 - Sum(PartC)

This will be calculated across all categories - You can then select the category via a selection box

jedgson
Creator
Creator

I was a little slow in replying!! 🙂

johnw
Champion III
Champion III

Or you could change your data model. PartA, PartB and PartC sound more like values than fields to me, though obviously you know your data better than I do, and this is almost certainly a hypothetical example:

CROSSTABLE (Part,Value)
LOAD * INLINE [
Category, PartA, PartB, PartC
A, 5, 3, 2
A, 10, 4, 1
A, 3, 6, 11
A, 2, 4, 8
B, 3, 0, 2
B, 5, 1, 4
C, 6, 4, 2
C, 2, 0, 1
];

dimension = Part
expression = sum(Value)

Not applicable
Author

thanks to all,

it works (pie chart without dimension, with 3 expressions), but little problem remains:

buble popup on each pie chart slice displays the same text - first expression label (!) although numbers are right (depends on pointed slice)

Not applicable
Author

Hi Jura,

I have the same problem in my pie chart. The pop up shows only the label of the first expression to all slices.

Any idea?

Thanks

Not applicable
Author

Nadsky,

Did you checked a Text as pop-up on each expression??

Not applicable
Author

HI Erico,

I checked the "Text as Pop Up" in each expression but still the label of first expression displays on all slices. I tried also not checking "Text as Pop Up".

By the way, my Pie Chart has no dimension.

Thanks!