Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
sanchi21491
Contributor II
Contributor II

Variable Extension - Multiple value selection

Hello Qlikers,

I am facing challenges while using a variable in the Filter Pane of Qlik Sense. I wish to select multiple values for dimensions like Country, Address in the filter pane. I'm using Qlik Variable Extension in my application and below expression for my dimensions in filter pane for which I created a Variable $(vTimePeriod)

aggr(only({<TimeFilter= {"$(vTimePeriod)"}>}Country),Country)

Using this expression is only allowing me to select one value at a time. Is there a way to tweak the above expression which would allow me to select multiple values from filter pane at a time?

Any ideas are appreciated!

Thanks!

1 Solution

Accepted Solutions
lorenzoconforti
Specialist II
Specialist II

Of course it doesn't show you other countries after you select IND because you've defined an aggregation function where you are limiting the data set (i.e. after you make your selection you are in a different set where only IND exists)

If you want to see the other values (i.e. you don't want your selected state to impact your aggregation) you need to specify that you want the full set (note the extra 1 below)

=aggr(only({1<Time_Period = {"$(v_Timeperiod)"}>}Country),Country)

View solution in original post

7 Replies
lorenzoconforti
Specialist II
Specialist II

Hi,

Not sure I understand the requirement completely. Are you trying to select multiple Time Periods in your vTimePeriod variable? I don't think it's possible through the Variable Extension (but there might be workarounds if that's what you are trying to achieve)

If that is not the case (i.e. you are not trying to select multiple periods through your variable), are you saying you can't select multiple countries in your filter pane when using the aggr function?

abhirup99
Contributor III
Contributor III

Yes it is the 2nd case, i.e. we can't select multiple countries in the filter pane when using the aggr function?

Is there any solution to tackle such problems?

Your solutions will be highly appreciated

lorenzoconforti
Specialist II
Specialist II

I've tried on my Qlik Sense and I'm having no problems selecting multiple values when using the aggregation

Can you share your app? Probably there is something else going on

abhirup99
Contributor III
Contributor III

When I try open the '"Country" filter first time, though it shows multiple values. But it allows only one selection.

It allows multiple selection that too from the filter navigation at the top and after I have done my initial selection of one value from the filter pane.

Test img_2.JPG

 
 

 

 

 

 

 

 


But when I select IND, it doesn't allow multiple selection provision thereafter.

Test img.JPG

 

 

 

 

 

Also attaching the qvf for reference.

lorenzoconforti
Specialist II
Specialist II

Of course it doesn't show you other countries after you select IND because you've defined an aggregation function where you are limiting the data set (i.e. after you make your selection you are in a different set where only IND exists)

If you want to see the other values (i.e. you don't want your selected state to impact your aggregation) you need to specify that you want the full set (note the extra 1 below)

=aggr(only({1<Time_Period = {"$(v_Timeperiod)"}>}Country),Country)

abhirup99
Contributor III
Contributor III

This helps me!

I understand the solution, thanks for detailing it so well.

I will implement this in my use case and reach out to you in case of any challenges I face.

 

lorenzoconforti
Specialist II
Specialist II

Happy to help

Please marked the post as solved