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: 
vmcintyre
Contributor II
Contributor II

Replacing a list in set analysis with a variable

Hi All, 

 

I have a calculation that looks like this:

sum([Supplier Legal Entity]={'option1','option2','option3'}>}[Supplier Legal Entity]).

I want to replace the list 'option1 etc.. with a variable so that if I need to change it, I only need to change it in one place. 

created a variable with the list, but when I tried to insert the variable back into the calculation, it failed. 

I'm afraid I can't share any examples. 

Many thanks in advance!

Labels (1)
1 Solution

Accepted Solutions
Kushal_Chawda

Create a variable as below

Name :vSLE 

Value : 'option1','option2','option3' (Note : Don't put "=" in value)

 

Now use below expression

sum({<[Supplier Legal Entity]={$(vSLE)}>}[Supplier Legal Entity])

View solution in original post

2 Replies
Kushal_Chawda

Create a variable as below

Name :vSLE 

Value : 'option1','option2','option3' (Note : Don't put "=" in value)

 

Now use below expression

sum({<[Supplier Legal Entity]={$(vSLE)}>}[Supplier Legal Entity])

vmcintyre
Contributor II
Contributor II
Author

Thank you!!