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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
NormanStanleyBadger

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

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

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
Author

Legend. Thank you.