Forum Discussion
12 months rolling averge
Hello, i have calculation for Mean Distance between failure (MDBF) but need help to make a 12 months rolling average for MDBF. I understand i need a DAX formula in connection with my formula below.
NOF= Number of failures
My calculation for MDBF is:
You can use the following formula:
Sales12M := CALCULATE ( SUM([Distance]), DATESBETWEEN ( Calendar[FullDate], NEXTDAY ( SAMEPERIODLASTYEAR ( LASTDATE ( Calendar[FullDate] ) ) ), LASTDATE ( Calendar[FullDate] ) ) )Best to add a customer calendar and then use the formula.
This sums the distance for the last 12 months. You can use the same formula for NOF and then divide the 2 measures.
Second option is described hon this link.
2 Replies
- themistoklis
Community Champion
You can use the following formula:
Sales12M := CALCULATE ( SUM([Distance]), DATESBETWEEN ( Calendar[FullDate], NEXTDAY ( SAMEPERIODLASTYEAR ( LASTDATE ( Calendar[FullDate] ) ) ), LASTDATE ( Calendar[FullDate] ) ) )Best to add a customer calendar and then use the formula.
This sums the distance for the last 12 months. You can use the same formula for NOF and then divide the 2 measures.
Second option is described hon this link.
- oilmanRegular Visitor
Thanks, that solved my problem