Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
how can I sum up the last 3 Orders of a customer?
I tried it with rank-function, but a sum() on rank() doesn't work.
sum(if(rank(Orderdate)<=3,sum(Ordervalue),0))
Please see my application in attachment.
Do you have a solution?
best regards
Peggy
Well, if you want to keep close to your idea, try this
=sum(aggr(if(rank(Orderdate)<=3,sum(Ordervalue),0),Customer,Orderdate))
you need advanced aggregation to embed an aggregation function like sum into another sum.
Hope this helps,
Stefan
Well, if you want to keep close to your idea, try this
=sum(aggr(if(rank(Orderdate)<=3,sum(Ordervalue),0),Customer,Orderdate))
you need advanced aggregation to embed an aggregation function like sum into another sum.
Hope this helps,
Stefan
Thanks Stefan, sometimes it's just so easy.