Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Dear community
I'm having issues with calculating the moving average of a percentage measure which is calculated on 2 moving average measures (that's right, a double moving average).
What I want is this:
Also attached here: WeTransfer
Rolling 12m =
VAR pre6 =
EDATE ( MAX ( DateTable[Date] ), -6 )
VAR cure =
MAX ( DateTable[Date] )
RETURN
CALCULATE (
[RATIO],
FILTER ( ALL ( DateTable ), DateTable[Date] >= pre6 && DateTable[Date] <= cure )
)
Formulas I use to get the ratio (which are all working as intended):
6M Moving avg 1 =
VAR pre6 =
EDATE ( MAX ( DateTable[Date] ), -6 )
VAR cure =
MAX ( DateTable[Date] )
var temp_table = FILTER(ALLSELECTED(ExtraLogic), ExtraLogic[date] >= pre6 && ExtraLogic[date] <=cure && ExtraLogic[DifferentDate] <= cure)
RETURN
SUMX(temp_table,ExtraLogic[“DATA1”])
6M Moving avg 2 =
VAR pre6 =
EDATE ( MAX ( DateTable[Date] ), -6 )
VAR cure =
MAX ( DateTable[Date] )
RETURN
CALCULATE (
[“DATA 2”],
FILTER ( ALL ( DateTable ), DateTable[Date] >= pre6 && DateTable[Date] <= cure )
)
RATIO = IFERROR([6M Moving avg 1]/[6M Moving avg 2], BLANK())
Please provide sample data in usable format (not as a picture).
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.