Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hello,
I have to calculate the result difference from a week day to another, but I didn't found any solution.
Here is the objective (see "variation" column):
Date | Product | Sales ($) | Variation ($) |
---|---|---|---|
29/5/2017 | Apples | 25k | - |
29/5/2017 | Bananas | 10k | - |
29/5/2017 | Lemons | 6k | - |
5/6/2017 | Apples | 21k | +4k |
5/6/2017 | Bananas | 23k | +13k |
5/6/2017 | Oranges | 19k | - |
12/6/2017 | Apples | 39k | +18k |
12/6/2017 | Bananas | 22k | -1k |
12/6/2017 | Oranges | 12k | -7k |
Do you have any idea?
Many thanks in advance,
Nicolas
Date and Product will be your dimensions here? Try this
Aggr(Sum(Sales) - Above(Sum(Sales), Product, (Date, (Numeric)))
Is this something you need in the script or front end?
preferably in the front end because the script has an automated load through several excel files.
Date and Product will be your dimensions here? Try this
Aggr(Sum(Sales) - Above(Sum(Sales), Product, (Date, (Numeric)))
It works Sunny
Thank you so much!
By the way, it has worked without the "numeric" field:
Aggr(Sum(Sales) - Above(Sum(Sales), Product, (Date))