Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi qlik community,
How could I make filters indipendent by each other selections?
I have to create a table where i have to compare same measure (for example sold quantity) for two different data range, and other fields value, selected by the user.
The filter where the user select the different data range, are created by two differet field obtain by the same field of the data set (I have the same problem for the item's seasons)
The problem is that when i select a data range in one filter, the other filter show me only the same value selected in the first.
How can i prevent this and let's the two filter show me all the value.
Thanks in advice.
Kind regards.
Hi,
Yes. You will have to create two non-linked tables in your script that you then set as filtering boxes. When a selection is made in these fields you can reference them in your calculation set-expression using RealValue = P(SelectedValue) where realvalue is the filter you make, and the selectedvalue is the value you selected in the filter box.
Hi,
I would work with data islands for the selection boxes, and then reference these selections in a set-expression in the calculations themselves. This separates the selection completely from the data set unless explicitly called for it in the set-expression.
Hi Gloria,
You have a few options.
1 - Look on QlikBranch for Alternate states extensions.
2 - Created Two New Fields in you data model for your selectors. then using variables and set analysis you can apply the selections to your charts.
vSelector1 = GetFieldSelections(Selector1)
vSelector2 = GetFieldSelections(Selector2)
Then set analysis would be something like
SUM({<Field1={'$(vSelector1)'}>}Sales).
3 - Duplicate the data model, one for each of your comparisons.
Mark
Hi and thanks for your answer,
does selection boxes work also in qlik sense? If yes how?
Hi,
Yes. You will have to create two non-linked tables in your script that you then set as filtering boxes. When a selection is made in these fields you can reference them in your calculation set-expression using RealValue = P(SelectedValue) where realvalue is the filter you make, and the selectedvalue is the value you selected in the filter box.
Hi Mark, thanks for your answer,
do you know if GetFieldSelections function works for more than 6 field value selected?
The field are date range and the user can choice to select lots of value.
Hi
You can use alternate state for two different charts.
settings-> general-> alternate state (set state A ).
when we create chart then in general tab we have to select state as State a
I'll try
Thanks
Hi @Mark_Little , I tried the second way , in the set expression its throwing error saying missing }
mine is Sum({<product={'$(vSelector1)'}>}YTD_revenue)
Kindly guide me what is the mistake
HI @Rajesh31
Can you share what is in the variable. The set analysis looks correct in your message so i assume the error is coming from the evaluation of the expression in the variable.