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: 
Bansal_Kumar
Contributor II
Contributor II

AGG Function with IF Statement

Hi Experts,

I have some values at Store and Item Level and I have to sum only those values which are greater than 500 at an aggregate level.

I did try the below code, But I am not getting the expected result. Please help.

sum(IF(AGGR($(value),COUNTRY,STORE,ITEM) > 500,AGGR($(value),COUNTRY,STORE,ITEM),0)

Please let me know if i am missing something.

 

 

Labels (1)
2 Replies
Kushal_Chawda
MVP
MVP

@Bansal_Kumar  what is the expression in $(value)?

sunny_talwar
MVP
MVP

How about this

Sum(Aggr(
    If($(value) > 500, $(value))
, COUNTRY, STORE, ITEM))