Forum Discussion
calculating run rate
- 5 years ago
Hi beast314 ,
My previous measure works in this sample. Do I miss anything?
Note: I didn't return any value for year level in the Matrix value, because I don't know your calculation logic for year.
Best Regards,
Icey
It is something like it
Date Sales_Quantity
12/07/2021 10
11/07/2021 5
10/07/2021 <Blank>
09/07/2021 8
08/07/221 6
07/07/2021 8
06/06/2021 2
If such data is given to me then I want a calculated column of (10+5+8+6+8+2)/6 =39/6 = 6.5
I have data in segment-wise so for each column I need the run rate. I don't care as long as I can present it in the matrix form. Like for segment A-> (11+8+3)/3 = 7.33
B-> (14+13+14)/3 = 13.66
C->(3+7)/2 = 5
- Fowmy5 years ago
Super User
beast314
You either use simple average as it excludes blanksRun Rate = AVERAGE( Table6[Quantity] )
Or specify explicitlyRun Rate = CALCULATE( AVERAGE( Table6[Quantity] ), Table6[Quantity] > 0 )- beast3145 years agoFrequent Visitor
How to put the date condition in this.
This table was made by making a measure
Quant30 = CALCULATE( SUM('Table'[Quantity]), FILTER( ALL('Table'[date]),'Table'[date]> TODAY()-30))How can I take an average of measure?- Fowmy5 years ago
Super User
Quant30 = CALCULATE( Average('Table'[Quantity]), FILTER( ALL('Table'[date]),'Table'[date]> TODAY()-30 && 'Table'[date]< TODAY()),
Table'[Quantity] > 0
)