Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Good morning guys.
I am using qlik sense and I have an issue preventing filters from effecting values.
I have four filters.
Selection1, Selection2, Selection3, and Control4 (They are all dimension feilds)
I have a measure called MeasureA. MeasureA is represented as SUM(distinct MeasureA)
When I make a selection to Control 4 I want Measure A filtered.
When I make a Selection to 1,2, or 3, I do NOT want MeasureA to be filtered.
I also don't want Selection 1,2, or 3 to filter Control4.
How do I accomplish this
First part of your question should be easy. You can ignore selection in fields Selection1, Selection2, and Selection3 like this
Sum(DISTINCT {<Selection1, Selection2, Selection3>} MeasureA)
Second part of the question will depend on your data model? Are the three above fields connected to Control4? If it is, do you each combination of the three fields connected to each possible value of Control4? If you have, then there is nothing to worry about. Else you can use alternate state to get this requirement.
Thanks Sunny for replying.
Yes, the first part works. When I make a selection to 1,2, or 3 MeasureA is not filtered. This is what I want.
For Part two, yes, Selection 1,2 and 3 ARE connected in the data model to Control4. This means whenever I make a selection to 1,2, or 3 automatically it filteres Control 4 because they are connected at the data level. To be exact:
Each combination of the three fields ARE connected to each possible value of Control4.
They share the same data source.
This is what I need to overcome. The selection for Control4 (a dimention) can not change when a selection to 1,2 or 3 is made.
Is this for a specific chart?
Yes I have two KPI charts which display the same MeasureA.
The first KPI is filtered by Contol4,
The second KPI is filtered by Selection 1,2 and 3.
Therefore the Selections can not filter the Control and vice versa.
This is a comparison report.
For the KPI on the left, it needs to be filtered by Control4 and Nothing Else.
For the KPI on the right, in needs to be filtered by Selection 1,2, and 3 but nothing else.
Control4 and Selection 1,2,3 are in the same data model.
May be try this for the one on the right
Sum(DISTINCT {<Control4>} MeasureA)
Yes this works on the right.
But the issue is the stopping the filters from filtering each other.
The measure are
Sum(DISTINCT {<Control4>} MeasureA)
like you said, but Selection 1,2 and 3 are still filtering Control 4 which is destroying the comparison.
When I make a selection to 1,2 or 3 I want Control 4 to remain unchanged.
I don't think I understand. Would you be able to elaborate on this using an example?
In short, I am using dimensions as filters on this sheet. I need to figure out how to get one filter to ignore another filter.
That is it.
I can create set analysis on a measure like you showed. But the items in that set can't be changed by other filters.
So:
Sum(DISTINCT {<Control4>} MeasureA)
is good by if I make a change to Selection1, Selection2 or Selection3, it CHANGES Control4 becasue they are in the same data model.
To put it more plainly:
How can you write an expression for Control4 as a filter that is independent of filters Selection1, Selection2 and Selection3.
In short, I am using dimensions as filters on this sheet. I need to figure out how to get one filter to ignore another filter.
That is it.
I can create set analysis on a measure like you showed. But the items in that set can't be changed by other filters.
So:
Sum(DISTINCT {<Control4>} MeasureA)
is good but if I make a change to Selection1, Selection2 or Selection3, it CHANGES Control4 becasue they are in the same data model.