Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Using set analysis/filters for dimensions

I have this table:

Col1    Col2

A            12

B            9

C            2

D            5

E            6

F            10

I'm building a bar chart and I need Col1 as the dimension. But I need only values B, C, E, F (say).

How do we use set analysis or filters here?

If we're using filters, the user should not have the freedom to manipulate this selection. At the same time, I need all the values available for other graphs in the sheet.

Thanks in advance!

1 Solution

Accepted Solutions
sunny_talwar

May be this

Sum({<Col1 = {'B', 'C', 'E', 'F'}>}Col2)

View solution in original post

7 Replies
agigliotti
Partner - Champion
Partner - Champion

use set analysis in chart expression like below:

ex. sum( {<  Col1 = {'B','C','E','F'} >} Col2 )

sunny_talwar

May be this

Sum({<Col1 = {'B', 'C', 'E', 'F'}>}Col2)

Anonymous
Not applicable
Author

Thanks. Can you tell me why this code isn't working. I seem to be missing something really simple here.

Capture.JPG

sunny_talwar

Missing a dollar sign expansion

Sum({<Year = {$(=Min(Year)), $(=Max(Year))}>} [Post Efficiency Savings])

OmarBenSalem

If you want to have a filter that contains only certain values of the col1, you can create a master dimension as follow:

=if( match(Col1,'A','B','C'), Col1,Null())

and then add it as a filter :

Capture.PNG

Anonymous
Not applicable
Author

Thanks Omar. Really helpful.

Anonymous
Not applicable
Author

Thanks a lot Sunny.