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

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

sunny_talwar

How about this

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