Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Qlikers,
I am facing challenges while using a variable in the Filter Pane of Qlik Sense. I wish to filter my dimensional values like Country, Address by Time(All Months|Previous Month), for which I created a Variable $(vTimePeriod).
How can I use this variable to filter my dimensional values in filter pane? Any ideas are appreciated!
Thanks!
This will depend on the definition of what you have calculated in variable $(vTimePeriod)
Suppose you have calculated "max(Year)" in that variable, which gives value as "2019" then you can use this variable to filter any dimension in filter pane
for eg. you can use variable to filter product dimension like below
= aggr(only({<Year = {"$(vTimePeriod)"}>}Product),Product)
What is the definition of that variable?
This will depend on the definition of what you have calculated in variable $(vTimePeriod)
Suppose you have calculated "max(Year)" in that variable, which gives value as "2019" then you can use this variable to filter any dimension in filter pane
for eg. you can use variable to filter product dimension like below
= aggr(only({<Year = {"$(vTimePeriod)"}>}Product),Product)
Thanks a lot! It solved my issue! Grateful
Hi Kush,
I'm using Qlik Variable Extension in my application and used the above expression in the filter pane for dimensions. However, I am not able to select multiple values at a time.
Is there a solution for this scenario?
Thanks!
Hi Kush,
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
I am illustrating the situation below
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.
But when I select IND, it doesn't allow multiple selection provision thereafter.
Also attaching the qvf for reference.
My observation is we can select multiple values by selecting any one value in the list and dragging down however, we are unable to use the SHIFT key to select the random values.
Use it like below
= aggr(only({1<Year = {"$(vTimePeriod)"}>}Product),Product)
Hi @Kushal_Chawda
Why $ is not working in the place of 1 ?
I mean i was thinking by keeping $ (Set identifier ) in front of Year would allow me to Select multiple Years from the Dimension Filter pane.
As per understanding $ should respect the current selection i.e value of expression changes based on the current selection made in UI and 1 will not change the value of that particular expression even if we make any selection in the UI
if you use $, aggr expression evaluates the associated value and removes the excluded values from filter. But if you use 1 then aggr function works as normal filter. So identifier '1' does the trick here in filter pane