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: 
santhosh_k_n
Creator II
Creator II

Multiple selection values

Hi All,

As per my requirement i am using variable and a if clause in multi box for filters as below,

for Geo hierarchy, Region and state, I am saving selections of region in a variable and for state multibox i am using if clause as below

if(region=V_region,State,'Please select region')

Where V_region=getfieldselections(Region)

The above is working fine for single selection made, say like if region selection is North the data in state multibox is only matching states but in case of multiple selections say North and South, the value in variable is 'North,South' and since there is no matching for same with region no data is getting displayed in state,

Please guide me

6 Replies
AbhijitBansode
Specialist
Specialist

Please post sample qvw file along with the test data.

PrashantSangle

Hi,

Use wildmatch() inside if()

Try like

if(wildmatch(region,V_region),State,'Please Select Region')

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
santhosh_k_n
Creator II
Creator II
Author

Hi Max,

This didn't work as the multiple selected values are saved in variable as comma separate say like 'North,South'

Not applicable

Hi,

To Divide those value you can use subfield function in expression

if Your V_Region  Value is 'North,South'

then Subfield(V_Region,',',1) will give North

and Subfield(V_Region,',',2) will give South


then you can use to compare these to values



santhosh_k_n
Creator II
Creator II
Author

Hi Vivek,

This will work if i am using the variable in other object, but i am using this for selections, and the output should be as follows

1. Region filed selected is North, So, V_region = North => Sate filter should display only States related to North

2. Region filed selected is North & South, So, V_region = North,South => Sate filter should display States related to North and south

.....

Hope I am clear

santhosh_k_n
Creator II
Creator II
Author

please find the QVW for the same