Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hi,
I would like to find a rolling sum for three years for every colour provided.
Solved! Go to Solution.
hi @Anonymous
try to plot a visual with year and colour columns, and a measure like:
3YColourSum =
VAR _year = MAX(TableName[year])
RETURN
SUMX(
FILTER(
ALL(TableName),
TableName[Colour] = MAX(TableName[Colour])
&&TableName[Year] IN {_year, _year-1, _year-2}
),
TableName[Sales]
)
it worked like:
Thank you! It worked well.
hi @Anonymous
try to plot a visual with year and colour columns, and a measure like:
3YColourSum =
VAR _year = MAX(TableName[year])
RETURN
SUMX(
FILTER(
ALL(TableName),
TableName[Colour] = MAX(TableName[Colour])
&&TableName[Year] IN {_year, _year-1, _year-2}
),
TableName[Sales]
)
it worked like: