Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
ranesaumitexpo
Partner - Contributor II
Partner - Contributor II

Pass List of value to Dimension using variable

Hi Guys,

 

Suppose I have a field name Country.  Now I want to set multiple values in a single variable something like vCountry='India','Italy','Germany'

Now I want to field Country only where it's matching vCountry values. something like if(Country=$(vCountry),Country).

Is it possible to achieve such a thing in Qlik Sense? Because when I am able to achieve this when I am passing only one single value. But I want to set multiple values I don't know how I can achieve it.

2 Replies
jwjackso
Specialist III
Specialist III

I would try the Match function.

 

If (Match(Country,'India','Italy','Germany') > 0,Country,Null())

or

If Match(Country,$(vCountry)) > 0,Country,Null())

 

Saravanan_Desingh

Yes, you can do it. In Script define the variable.

SET vCountry='India','Italy','Germany';

In the dimension, you can use it.

If(Match(Country,$(vCountry)),Country)