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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
NormanStanleyBadger
Creator
Creator

If Statement with Aggr Remove Others

Hi,

I have got the following set analysis below to filter a table based on the calculation. However, I only want to see the records that meet the condition and not the others. 

Is anybody aware of a way to do this without seeing the others / records that do meet the condition?

=
If(
Aggr(
(SUM({$<[Set Analysis>} [Revenue])
-
SUM({$<[Set Analysis>} [Book Value]))
/
Count({<Set Analysis>} distinct[SKU ID])
,[SKU Code])
<=-500,
[SKU Code])

 

Labels (3)
1 Solution

Accepted Solutions
OmarBenSalem
Partner - Champion II
Partner - Champion II

Create your expression a  DIMENSION :

AGGR(

If(
Aggr(
(SUM({$<[Set Analysis>} [Revenue])
-
SUM({$<[Set Analysis>} [Book Value]))
/
Count({<Set Analysis>} distinct[SKU ID])
,[SKU Code])
<=-500,
[SKU Code])

,[SKU Code])

and uncheck "show null values"

View solution in original post

2 Replies
OmarBenSalem
Partner - Champion II
Partner - Champion II

Create your expression a  DIMENSION :

AGGR(

If(
Aggr(
(SUM({$<[Set Analysis>} [Revenue])
-
SUM({$<[Set Analysis>} [Book Value]))
/
Count({<Set Analysis>} distinct[SKU ID])
,[SKU Code])
<=-500,
[SKU Code])

,[SKU Code])

and uncheck "show null values"

NormanStanleyBadger
Creator
Creator
Author

Legend. Thank you.