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

Announcements
We are aware of an issue with the Product Downloads page and looking into it.
cancel
Showing results for 
Search instead for 
Did you mean: 
Derek_T
Contributor III
Contributor III

How to use set modifier with a variable ?

Let's say I have a formula like the one below (taken from Qlik help):

sum( {$<Year = {2000}, Region = {US, SE, DE, UK, FR}>} Sales )

Instead of listing the countries: {US, SE, DE, UK, FR} I'd like to find a way to dynamically compute this list based on value available in one of the table.

The table would look something like this:

Country  / Value 1 / Value 2 ...
US
US
FR
FR
FR
DE
US
UK
...

I'd like to be able to extract the list of unique countries from this table and pas it as an argument to the set modifiers.

Thanks !

Labels (2)
1 Solution

Accepted Solutions
stevejoyce
Specialist II
Specialist II

you can look to use the P() function here.

Region = P({< optional set analysis to determine which countries >} Country)

View solution in original post

1 Reply
stevejoyce
Specialist II
Specialist II

you can look to use the P() function here.

Region = P({< optional set analysis to determine which countries >} Country)