Forum Discussion
Rolling Calculation
- 9 years ago
Hi,
Unfortunately this website is blocked by our internbet security, so I am unable to view.
However, thanks to Bhavesh Patel, I have managed to understand the process more and seem to have found my solution:
NEWTEST_C = CALCULATE([TotalWorkingDaysActual_M],
DATESINPERIOD('KPI_ABS'[Month_Year],
LASTDATE('KPI_ABS'[Month_Year]),-11,MONTH
))This gives me the result I need each month.
Thank you Bhavesh for your patience and help.
Kind Regards
Rich.
I have written the following two measures:
TotalWorkingDaysActual_M = SUM(KPI_ABS[WorkingDaysActual_C])
Rolling Average 12 Months_M = CALCULATE (
[TotalWorkingDaysActual_M],
DATESBETWEEN(
DATE_RANGES[Date],
NEXTDAY( SAMEPERIODLASTYEAR ( LASTDATE ( DATE_RANGES[Date] ))),
LASTDATE ( DATE_RANGES[Date] )
)
)
I have then created a graph and a time filter using the Date_Ranges[Date] for consistency. But my graph is still showing the over all total for each month.
Any test I do by turning measures to columns just show a value of 674 for each month?
A calendar table is necessary if we’d like to use the Time Intelligence Functions. Please take a look at the .pbix file provided by BhaveshPatel. It seems to work well. In case you still have problem with it, please post back.
Best Regards,
Herbert
- BhaveshPatel9 years agoSuper User
Thank you Sir. Happy to hear that you found the solution.
We are a great community of PowerBI.
Thanks & Regards,
Bhavesh
- RichWyeth9 years agoFrequent Visitor
Hi,
Unfortunately this website is blocked by our internbet security, so I am unable to view.
However, thanks to Bhavesh Patel, I have managed to understand the process more and seem to have found my solution:
NEWTEST_C = CALCULATE([TotalWorkingDaysActual_M],
DATESINPERIOD('KPI_ABS'[Month_Year],
LASTDATE('KPI_ABS'[Month_Year]),-11,MONTH
))This gives me the result I need each month.
Thank you Bhavesh for your patience and help.
Kind Regards
Rich.
- iamvaish9 years agoRegular Visitor
Hi Rich,
Could you please elaborate on the Month-year field that you have used.
Additionally would like to know,if you are using Measure or Column for Rolling period Calculation.
Awaiting your response
Kind Regards,
Vaishnavi