Skip to main content

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
QlikWorld 2023, a live, in-person thrill ride. Save $300 before February 6: REGISTER NOW!
cancel
Showing results for 
Search instead for 
Did you mean: 
NormanStanleyBadger
Contributor III
Contributor III

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
Contributor III
Contributor III
Author

Legend. Thank you.