Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
rachel_delany
Creator II
Creator II

Measure value not changing after filtering

I've created a number of master measures to count the same measure but for different values of another field (using set analysis).

I have these measures displayed in KPI charts on the same page, however when I apply a filter to look at just one of the values of that field, none of the measures change value.

Does anyone know if this behaviour is intended? It seems extremely odd to me.

I've done heaps of troubleshooting and cannot figure this one out.

9 Replies
Lisa_P
Employee
Employee

Set Analysis will stop selections being applied in any fields that are used in set analysis. Also if you use the '1' Identifier it will ignore all selections.  Can you share your expressions in your Master Measures ?

rachel_delany
Creator II
Creator II
Author

Thanks Lisa, I didn't realise that selections wouldn't apply unless I had used the 1 identifier.

An example of the expressions are:

COUNT({$<WL_STATUS={'1'},WaitStatus={'In Time'}>}DISTINCT FacElectiveKey)

COUNT({$<WL_STATUS={'1'},WaitStatus={'Long Wait'}>}DISTINCT FacElectiveKey)

I am applying selections to the WaitStatus field.

Is there any workaround to do what I'm trying to do?

Lisa_P
Employee
Employee

Selections will apply when you have the $ as identifier unless you are specifying a value.

For your expressions:

COUNT({$<WL_STATUS={'1'},WaitStatus={'In Time'}>}DISTINCT FacElectiveKey)

COUNT({$<WL_STATUS={'1'},WaitStatus={'Long Wait'}>}DISTINCT FacElectiveKey)

as you have WaitStatus defined, you can no longer select this field as you want 'In Time' or 'Long Wait'

rachel_delany
Creator II
Creator II
Author

Thanks Lisa. Is there any way to restructure the expression to make it work?
Lisa_P
Employee
Employee

If you add a plus symbol(+), this will show 'In Time' + selected values of WaitStatus

COUNT({$<WL_STATUS={'1'},WaitStatus+={'In Time'}>}DISTINCT FacElectiveKey)

rachel_delany
Creator II
Creator II
Author

Thanks but that's not quite what I'm looking for.

I want that measure to actually only show me what is in the set modifier, applying any selections as well.

E.g. if I selected WaitStatus = 'Long Wait' then COUNT({$<WL_STATUS={'1'},WaitStatus={'In Time'}>}DISTINCT FacElectiveKey) should equal 0 as obviously nothing in the current selection set will have a WaitStatus of 'In Time'.

 It would be great if this was actually explained here, as to me this is not logical behaviour. I would expect that any selections should apply unless I am using the '1' identifier.

Lisa_P
Employee
Employee

Ok, I get what you want now, try this:

COUNT({$<WL_STATUS={'1'},WaitStatus*={'In Time'}>}DISTINCT FacElectiveKey)

This will look for the intersection of what is defined in Set Analysis and what is selected.

There is an explanation on the operators here:

https://community.qlik.com/t5/QlikView-Documents/Romancing-with-Set-Analysis/ta-p/1485889

rachel_delany
Creator II
Creator II
Author

Thanks so much Lisa, that was exactly what I needed!
Can I suggest that more detail is provided on the actual system documentation pages?
Community posts are all well and good but I would really expect this to be explained in detail in the system documentation.
Lisa_P
Employee
Employee

Hi Rachel,

Set Analysis can be quite complex, so I recommend looking at some help videos/demo from Mike Tarallo to explain the concepts.

https://www.youtube.com/watch?v=YMQJnKMkfxg

Regards,

Lisa