I have uploaded in my app a sales record with some attributes as day, product sold, quantity, price….(all columns).
Day Product quantity price 1 Nov Red shoes 2 7$ 1 Nov Blue shoes 1 2$
I have created a master item called months where I add all the days of the month,
And a master item called week, where I add the weeks.
Now, what I want to do is to create three different measures
1) Last 30 days
2) Last 7 days
3) Last 3 days
Basically what I would like to do is to put these three measures in a table as column, in a way that I can see something like
PRODUCT Last 30 days last 7 days last 3 days
Black shoes sold 25 6 2
Red shoes sold 95 12 7
And so on.
The goal would be to create “Auto updating master measures”
This means that every day, when I replace the existing doc with an updated version, my app should be able to scan all the days in the “days” column, find the last 30, last 7 and last 3, and update the master measures.
The product column is then calculated including the master measure in the calculation and it’s automatically updated.