Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I want to analyze customers, who have slightly decreasing order amounts.
So I want to get the average of the last 5 orders dynamically in the chart. Maybe I want to change from last 5 to last 10 or want to set the analyzed timeline.
I tried differnt options with set analysis, but nothing worked.
In the attachment I have some sample data.
Thanks in advance for your help!
Try this
Sum(Aggr(
If(date >= Max(TOTAL <customer> date, 5) and date <= Max(TOTAL <customer> date), Sum(amount))
, date, customer))
May be something like this
Avg(Aggr(If(date >= Max(TOTAL <customer> date, 5) and date <= Max(TOTAL <customer> date), Num(amount)), date, customer))
Sorry for my late response.
It works almost perfect.
But if a customer places more than one order per date, the formula doesn't work.
Try this
Sum(Aggr(
If(date >= Max(TOTAL <customer> date, 5) and date <= Max(TOTAL <customer> date), Sum(amount))
, date, customer))