Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

gloria_bertini
Contributor

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
Contributor III

Re: How to make filter indipendent by each others

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.

7 Replies
niclaz79
Contributor III

Re: How to make filter indipendent by each others

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
Valued Contributor III

Re: How to make filter indipendent by each others

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
Contributor

Re: How to make filter indipendent by each others

Hi and thanks for your answer,

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

niclaz79
Contributor III

Re: How to make filter indipendent by each others

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
Contributor

Re: How to make filter indipendent by each others

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
Contributor

Re: How to make filter indipendent by each others

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
Contributor

Re: How to make filter indipendent by each others

I'll try

Thanks

Community Browser