Forum Discussion
Anonymous
7 years agoNot applicable
Running average between two dates
Hi, I have copied an issue below. Please help me in solving this as soon as possible. I have below data. date HC REV 1-Dec-18 589 1-Jan-19 616 9500 1-Feb-19 630 5698 1-...
- 7 years ago
Anonymous ,
Create three calculate columns using DAX below:
Running HC AVG = IF('Table'[date] <> MIN('Table'[date]), CALCULATE(ROUNDDOWN(AVERAGE('Table'[HC]), 0), FILTER('Table', 'Table'[date] <= EARLIER('Table'[date])))) Running REV SUM = CALCULATE(SUM('Table'[REV]), FILTER('Table', 'Table'[date] <= EARLIER('Table'[date]))) Running rev sum/running HC AVG = 'Table'[Running REV SUM] / 'Table'[Running HC AVG]Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-yuta-msft
7 years agoCommunity Support
Anonymous ,
Create three calculate columns using DAX below:
Running HC AVG = IF('Table'[date] <> MIN('Table'[date]), CALCULATE(ROUNDDOWN(AVERAGE('Table'[HC]), 0), FILTER('Table', 'Table'[date] <= EARLIER('Table'[date]))))
Running REV SUM = CALCULATE(SUM('Table'[REV]), FILTER('Table', 'Table'[date] <= EARLIER('Table'[date])))
Running rev sum/running HC AVG = 'Table'[Running REV SUM] / 'Table'[Running HC AVG]
Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.