Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I defined in the expression to only view a specfic set of data, but I might want to view only a sub-part of the presentation by selecting one (or more) of the possible values. Unfortunately, I don't know how to do this... It always sticks to the selections made in the set analysis expression. Since 'C' is a value of the array 'A,B,C,D,E' I would think this should work?
Script:
Test:
load * inline [
Name, Salary
A,10
B,20
C,30
D,40
E,50];
Set analysis expression: sum({<[Name]={'A','B','C','E'}>} Salary)
In Set Analysis, when you add a filter Name={something}, the equals sign "=" means "replace user selections with this". So obviously any of your selections in the same field will get ignored, or more accurately, replaced with the filter values.
In order to allow both selections, you need to add one of the Boolean operators before the + sign. For example, this should do what you are looking for:
sum({<[Name]*={'A','B','C','E'}>} Salary)
*= means the intersection of user selections with the list of values. So, when nothing is selected, you will get A, B, C, E. If you select one of the four values, you will get just what you've selected.
cheers,
Oleg Troyansky
Upgrade your Qlik skills at the Masters Summit for Qlik - coming soon to Milan, Italy and Austin, TX!
Try this:
Sum({<[Name] *= {'A','B','C','E'}>} Salary)
I believe you want to use the intersection operator * here:
sum({<[Name] *= {'A','B','C','E'}>} Salary)
In Set Analysis, when you add a filter Name={something}, the equals sign "=" means "replace user selections with this". So obviously any of your selections in the same field will get ignored, or more accurately, replaced with the filter values.
In order to allow both selections, you need to add one of the Boolean operators before the + sign. For example, this should do what you are looking for:
sum({<[Name]*={'A','B','C','E'}>} Salary)
*= means the intersection of user selections with the list of values. So, when nothing is selected, you will get A, B, C, E. If you select one of the four values, you will get just what you've selected.
cheers,
Oleg Troyansky
Upgrade your Qlik skills at the Masters Summit for Qlik - coming soon to Milan, Italy and Austin, TX!
with Sunny and Stefan here, why even bother? 🙂
One of Henric's hic recent blogs gave an overview of Set operators
Wow, what a team!!
Thanks a lot for all the replies! Needless to say, they were all correct!
Unfortunately I can only select one as 'THE' correct answer... but kudos for all of you .
Love this forum and it's members.