Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello!
I'm trying to calculate the average daily sales (including +/- 3 days)
In Excel it looks like this:
Dim | DateID | Sales | AvgSales-+3 |
Dim1 | 01.10.2018 | 3 | 4,50 |
Dim1 | 02.10.2018 | 4 | 4,20 |
Dim1 | 03.10.2018 | 5 | 3,83 |
Dim1 | 04.10.2018 | 6 | 3,86 |
Dim1 | 05.10.2018 | 3 | 4,14 |
Dim1 | 06.10.2018 | 2 | 3,86 |
Dim1 | 07.10.2018 | 4 | 3,71 |
Dim1 | 08.10.2018 | 5 | 3,71 |
Dim1 | 09.10.2018 | 2 | 3,71 |
Dim1 | 10.10.2018 | 4 | 3,71 |
Dim1 | 11.10.2018 | 6 | 3,71 |
Dim1 | 12.10.2018 | 3 | 3,71 |
Dim1 | 13.10.2018 | 2 | 4,00 |
Dim1 | 14.10.2018 | 4 | 4,00 |
Dim1 | 15.10.2018 | 5 | 3,50 |
For example: AvgSales-+3 for 7.10.2018 = average sales from 4.10.2018 till 10.10.2018
In qlik i'm calculated this by expression:
RangeAvg(
Above(Sum(Aggr(Sum(Sales),DateID)),0,4),
Below(Sum(Aggr(Sum(Sales),DateID)),1,3)
)
Help me please calculate this sum of average values without a date in the dimension?
If date is not a dimension... then is this based on a selection?
I need to get the amount of some average for the period.
I'm trying to calculate lost sales.