Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear All,
please look at the attached example below,
I want to find the sales amount for every customers refer to their last Sales Date.
I use sum(if(Date = $(=max(Date)), Amount))
but only customer c with the Max Date of the entire Data set will return the correct result,
can anyone help?
Many thanks!!!
The $() substitution id done only once for the entire chart. Instead, you need to use aggr() for row by row calculation,
sum(if(Date=aggr(NODISTINCT MAX(Date),Customer),Amount))
-Rob
PFA