Skip to main content
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

1 Solution

Accepted Solutions
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/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
Partner Ambassador/MVP
Partner Ambassador/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..