Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
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.

3 Replies
Anonymous
Not applicable

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

sunny_talwar

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
Partner Ambassador/MVP
Partner Ambassador/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!