Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Friends ,
Below is my expression and it is always returning 0 , please suggest it is correct or not ?
=if(
Aggr((((sum(TOTAL{<Flag={'Brand'}, fin_acct={'NR'}>}ACTUALS_USD_BU)/1000)/
(sum(TOTAL{<Flag={'Brand'}, fin_acct={'Total Volume'}>}ACTUALS_USD_BU)/1000)) -
((sum({<Flag={'Brand'}, fin_acct={'NR'}>}ACTUALS_USD_BU)/1000)/
(sum({<Flag={'Brand'}, fin_acct={'Total Volume'}>}ACTUALS_USD_BU)/1000))),%Country_Key) >0
and
Aggr((((sum(TOTAL{<Flag={'Brand'}, fin_acct={'MACO'}>}ACTUALS_USD_BU)/1000)/
(sum(TOTAL{<Flag={'Brand'}, fin_acct={'Total Volume'}>}ACTUALS_USD_BU)/1000)) -
((sum({<Flag={'Brand'}, fin_acct={'MACO'}>}ACTUALS_USD_BU)/1000)/
(sum({<Flag={'Brand'}, fin_acct={'Total Volume'}>}ACTUALS_USD_BU)/1000))),%Country_Key) <0
and
Aggr((sum(TOTAL{<Flag={'Brand'}, fin_acct={'Total Volume'}>}ACTUALS_USD_BU)/1000),%Country_Key) >0 , 1 , 0)
Not sure how you are using this, but why do you need a Aggr() function here?? You don't even have an outer aggregation. May be you need to add a outer aggregation or may be you just don't need Aggr(). Difficult to say whats right and whats not without knowing the intent