Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
tinkerz1
Creator II
Creator II

Set Analysis, charting each selection in a chart


Hi all

Really stuck on this one, how do I set up an expession to show a list box selection per line on a chart.

For instance the list box has 6 items, I select 3, how do I get 3 lines in the chart?

Thanks

Neil.

21 Replies
sunny_talwar

The only possible way I can think of is to create 6 expressions and each one of them can hide/show based on your selection in the list box. For more helpful solution you will need to provide some sample data.

Best,

Sunny

tinkerz1
Creator II
Creator II
Author

                    Date:Jan     Feb       Mar     Apr

Description
A                          1          2          3        4        

B                         4           3          2        1    

C                         2           2          2        2

D                         3           4          3        4

I jus want to chart B and C when I select from the description list box for Jan to Apr    

sunny_talwar

See if this is what you want to achieve?? PFA the application as well

Capture.PNG

tinkerz1
Creator II
Creator II
Author

Yes this is exactly what I was after, I have the free version at the moment so I can't open a qvd, can you post the code.

Thanks so much,

Neil.

sunny_talwar

Created 4 expressions like the below image:

Capture.PNG

Expression 1: =Sum({<Description = {'A'}>}Value)

Expression 2: =Sum({<Description = {'B'}>}Value)

Expression 3: =Sum({<Description = {'C'}>}Value)

Expression 4: =Sum({<Description = {'D'}>}Value)

Conditions to Show each of the expression:

Condition 1: =SubStringCount(Concat(DISTINCT Description, '|'), 'A') = 1

Condition 2: =SubStringCount(Concat(DISTINCT Description, '|'), 'B') = 1

Condition 3: =SubStringCount(Concat(DISTINCT Description, '|'), 'C') = 1

Condition 4: =SubStringCount(Concat(DISTINCT Description, '|'), 'D') = 1

I hope this will help.

Best,

Sunny

c_gilbert
Creator II
Creator II

I don't think you necessarily need to use set analysis.

You could add the 'Description' field to the Dimensions tab, and there would just be one Expression: sum(Value)

This way, if you add more Descriptions to your data, they will automatically be available in your list box.

sunny_talwar

That is true as well, this solution did not come to my mind

sunny_talwar

Tinkerz1Forget about what I gave you as a solution, use the method Charlotte Gilbert‌ just mentioned above. Sorry for not guiding you in the correct direction and thanks to Gilbert for bringing you on right track.

Best,

Sunny

tinkerz1
Creator II
Creator II
Author

This works and is very simple, however I need 1 bar and 2 lines of data, how can I do this?