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: 
kalpesh13
Contributor
Contributor

aggr within if statement

Hi,

I cant figure out query to get single amount (highlighted) as KPI figure.  

I am looking for a correct query for 

KPI chart formula :

SUM( IF( Aggr ( COUNT (distinct C_NonCat_Flag) ,W3_Desc) > 1 AND C_NonCat_Flag = 'NC',Amount,0 ))

Thank you.

Qlik_Query.JPG

Labels (1)
1 Solution

Accepted Solutions
kaushiknsolanki
MVP
MVP

Try this.

Sum({<W3_Desc = {'=Aggr(Count(Distinct C_NonCat_Flag),W3_Desc)>1'},C_NonCat_Flag = {"NC"}>}Amount)

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!

View solution in original post

2 Replies
kaushiknsolanki
MVP
MVP

Try this.

Sum({<W3_Desc = {'=Aggr(Count(Distinct C_NonCat_Flag),W3_Desc)>1'},C_NonCat_Flag = {"NC"}>}Amount)

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
kalpesh13
Contributor
Contributor
Author

Thanks Kaushik..