Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
jalanhart
Creator
Creator

Measure with Set Analysis not filtering correctly

I have a measure created as so 

Sum({<SALES_UNIT_MEAS = {'l'}>} INVOICED_QTY)

it calculates the values correctly, but if I filter the SALES_UNIT_MEAS on a different unit of measure that is not l, the values remain static in the table. it should turn blank and say "undefined values". it does i have several copies of the same app and it seems to work on one copy but not others. 

why is it not filtering down when others criteria are selected?

Labels (1)
1 Solution

Accepted Solutions
rubenmarin

Hi, the value used in set analysis will overwrite selections on that fields. If some chart is working diferently it should have something different.

To apply slection to that field it should be something as:

Sum({<SALES_UNIT_MEAS *= {'l'}>} INVOICED_QTY)

Or maybe it's using altern states in some ways, or fields are renamed, or something, but the bahaviour described in your initial post is the expected behaviour.

View solution in original post

7 Replies
Qrishna
Master
Master

the expression seems working as intended. there shouldnt be any effect on the summation when other values are selected from SALES_UNIT_MEAS. could you share a picture of the selections your making in other copies and theri expressions? if possible, share some same data.

jalanhart
Creator
Creator
Author

it's from the same table, just a different field selection basically for different units of measure for different regions. 

but you can see how it fails where I pick a Unit of Measure that is neither Liters nor Each and the table does not remove them

jalanhart_0-1729902544228.png

 

If I do something similar in a different version of the app, I get a blank chart which is the intent

jalanhart_1-1729902616157.png

 

Qrishna
Master
Master

i cant really say anything just by looking the pictures, try copying the object thats good from the app to another and see how it behaves.

rubenmarin

Hi, the value used in set analysis will overwrite selections on that fields. If some chart is working diferently it should have something different.

To apply slection to that field it should be something as:

Sum({<SALES_UNIT_MEAS *= {'l'}>} INVOICED_QTY)

Or maybe it's using altern states in some ways, or fields are renamed, or something, but the bahaviour described in your initial post is the expected behaviour.

jalanhart
Creator
Creator
Author

that was it thank you! 

I think I had that previously somewhere but when I came back to it I was asking myself why that * was there and probably removed it...

I'm still not sure what that syntax means or does but it seems to be working how I want.

rubenmarin

The * in set analysis is the operator for intersections, if 'I' is not in the selections the result would be an empty set.

https://help.qlik.com/en-US/sense/May2024/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/SetAnalysi...

seanbruton

Superb !!! Neat Solution.