Forum Discussion
Cumulative average without using "datesinperiod" function
Hi Anonymous ,
You can try to create measures like DAX below.
Period End = LASTDATE('Product'[Date])
Period Start= FIRSTDATE( DATESINPERIOD('Product'[Date], [Period End], -3, DAY))
Rolling 3 Day Avg = CALCULATE(AVERAGE('Product'[Volume]),DATESBETWEEN ( 'Product'[Date], [Period Start], [Period End] ))
Best Regards,
Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Anonymous6 years agoNot applicable
Is it impossible to do without the "datesinperiod" function? Please can you tell me why?
- v-xicai6 years ago
Community Support
Hi Anonymous ,
Does the formulas above make sense? Could you please tell me the reason why you don't want to use DATESINPERIOD function?
Best Regards,
Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Anonymous6 years agoNot applicable
Hi v-xicai ,
It makes sense but I don't feel comfortable that I am unable to do the calculation without the "datesinperiod" function. I don't feel comfortable just blindly using built in filters, hope that makes sense? (happy to use built in functions later on when I know what I'm doing to tidy up the code)
CM