Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I am trying to compare a field with an aggregation of another field but I am not successful in doing so, can someone please help me if I am missing something simple in it.
I am using below code
max(aggr(if(MIN <= (sum({<YEAR = {'2019'}>}SALES)/
((sum({<YEAR = {'2018'}>}SALES)
+sum({<YEAR = {'2017'}>}SALES))/2)),REBATE),PAYER))
Below code works but I want it to calculate at each dimension
max({<MIN = {"<=$(= sum({<YEAR = {'2019'}>}SALES)/
((sum({<YEAR = {'2018'}>}SALES)
+sum({<YEAR = {'2017'}>}SALES))/2))"}>}
REBATE)
please find the attached sample app for my data set.
May be this
Max(Aggr(
If(MIN <= (Sum(TOTAL <PAYER> {<YEAR = {'2019'}>} SALES)/
((Sum(TOTAL <PAYER> {<YEAR = {'2018'}>} SALES)
+Sum(TOTAL <PAYER> {<YEAR = {'2017'}>}SALES))/2)), REBATE)
, PAYER, MIN))
May be this
Max(Aggr(
If(MIN <= (Sum(TOTAL <PAYER> {<YEAR = {'2019'}>} SALES)/
((Sum(TOTAL <PAYER> {<YEAR = {'2018'}>} SALES)
+Sum(TOTAL <PAYER> {<YEAR = {'2017'}>}SALES))/2)), REBATE)
, PAYER, MIN))
It worked.
Thanks,