Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Tell us which business and trade publications you read most regularly: RESPOND NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
gloria_bertini
Creator
Creator

How to make filter indipendent by each others

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.

1 Solution

Accepted Solutions
niclaz79
Partner - Creator III
Partner - Creator III

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.

View solution in original post

7 Replies
niclaz79
Partner - Creator III
Partner - Creator III

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.

mark6505
Partner - Specialist III
Partner - Specialist III

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

gloria_bertini
Creator
Creator
Author

Hi and thanks for your answer,

does selection boxes work also in qlik sense? If yes how?

niclaz79
Partner - Creator III
Partner - Creator III

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.

gloria_bertini
Creator
Creator
Author

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.

sakshamkaul
Creator II
Creator II

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

gloria_bertini
Creator
Creator
Author

I'll try

Thanks