Skip to main content
Announcements
Customer Spotlight: Discover what’s possible with embedded analytics Oct. 16 at 10:00 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
agni_gold
Specialist III
Specialist III

Expression validation.

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)

1 Reply
sunny_talwar

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