Forum Discussion
Quick measure - Moving average
- 7 years ago
You can write something like
=IF( [OtherMeasureInChart]<>Blank(), [Rolling Avg Measure] )
Thanks for your answer,
I've found a solution to my problem, for a 3 month rolling average i have to write "-2" instead of "-3".
I have now another question.
You can see in my chart that rolling average is calculated for future month (January, February and March 2019). How can i stop the measure so that i don't have a wrong presentation?
Thanks
Martin
You can write something like
=IF( [OtherMeasureInChart]<>Blank(), [Rolling Avg Measure] )
- Anonymous7 years agoNot applicable
Thank you for your answer, that's work perfectly.
I have a last question, is it possible to remove the first 2 month of 2016 on the chart for the measure because this is not calculated on a 3 month basis due to filter applied on the report.
Thank you
Martin
- ChandeepChhabra7 years agoImpactful Individual
Hi Anonymous
You can further wrap the entire IF function in the CALCULATE Function. Something like
=CALCULATE (
[EntireIFfunctionMeasure],
DATESBETWEEN ( Cal[Date], DATE ( 2016, 3, 1 ), MAX ( Cal[Date] ) ) )Cal[Date] - will come from your calendar table. Should be related to your transactions table
DATESBETWEEN Function - will allow you to run the calculation between set time periods. In this case the start date has been manually punched as 1st Mar 2016 by using the DATE function
I hope that works
- Anonymous7 years agoNot applicable
Hi,
Thanks for your answer. It's not working as the rolling average for march is equal to march data. The calculation seems to begin in march 2016.
- Anonymous7 years agoNot applicable
Your simple trick saved my day..
Thanks mate