Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am trying to figure out a way to calculate the average daily sales per retail and then return the retail that has the highest daily average.
Below is an exemple of raw data followed by the expected result
Result
Model | Retail |
A | 100 |
B | 200 |
Raw
Date | Model | Retail | Sales |
1/1/2020 | A | 100 | 50000 |
1/1/2020 | B | 200 | 10000 |
1/2/2020 | A | 100 | 58000 |
1/2/2020 | B | 200 | 19000 |
1/3/2020 | A | 110 | 35000 |
1/3/2020 | B | 220 | 10000 |
1/4/2020 | A | 115 | 25000 |
1/4/2020 | B | 215 | 8500 |
1/5/2020 | A | 140 | 15000 |
1/5/2020 | B | 240 | 3000 |
can you share more Raw Sample Data to verify ? do you still have 2 lines per day ?
Hi,
No the data is made up, simply for a proof of concept. If you require more data you can create dummy data in excel.
There could be more than 2 models per day.
Thanks
Hi ,
Could you please try this way,
In straight table,take Model as Dimension and Retail as Measure exp:(=FirstSortedValue(Retail,-Sales))
Now under sorting section - Model - sort by expression (=sum(Sales)/Count({<Retail={*},Model={*}>}distinct Date)) and select descending .
Hope it helps!
Regards,
Ravi