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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
YarinInbar
Contributor II
Contributor II

Messure for spesific values

Hello, 
I'm trying to build a measure (sales) for specific value (item group), without to select it.

I tried to use if, and its showing the correct result only if I select the specific value in the sheet (sunglasses):

=IF([item group]='sunglasses',[total sales - amount])

I want it to work and show to total sales of sunglasses without making the selection in the whole sheet.

1 Solution

Accepted Solutions
Or
MVP
MVP

Sum({< [item group] = {"sunglasses"} >} Sales) ought to do the trick.

View solution in original post

4 Replies
Or
MVP
MVP

Sum({< [item group] = {"sunglasses"} >} Sales) ought to do the trick.

YarinInbar
Contributor II
Contributor II
Author

it's not working, I always get 0.
"sales" should me a measure or a variable? anyways, I get 0 with both. 

Or
MVP
MVP

Sales should be the field you are trying to sum. The set analysis should exactly match both the field name you are filtering on and the value you are filtering for, including capitalization / spacing / etc.

YarinInbar
Contributor II
Contributor II
Author

It works! thank you for the explanation! 😀