Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
sumitratnani
Contributor III
Contributor III

Set Analysis

I have this kind of expression in multiple charts for Important Awards

Count({1<Award = {'Star of the Month','Spot Award','Performance Award','Quarterly Award'}>} [Award Id]

I wonder if I could keep this thing {'Star of the Month','Spot Award','Performance Award','Quarterly Award'} in some variable and use that variable in above expression so that in future if I have to change number of important Awards , I should change at one place and result should reflect in all charts.

I am not looking for getSelection kind of methods approach.

Please if one could help.

Thanks in advance.

Labels (1)
3 Replies
Anonymous
Not applicable

Count({1<Award = {$(YOURVARIABLE)}>} [Award Id]

sunny_talwar
MVP
MVP

Sure, create a variable like this through variable overview

vAwards

'Star of the Month','Spot Award','Performance Award','Quarterly Award'

and then this

Count({1<Award = {$(vAwards)}>} [Award Id])

kaushiknsolanki
MVP
MVP

Hi,

The optimized way is you flag the Award in Script, like below.

LOad *, if(Wildmatch(Award,'Star of the Month','Spot Award','Performance Award','Quarterly Award'),1,0) as Flag From xyz;

Then you can use the set analysis like below.

Count({1<Flag = {1}>} [Award Id])

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!