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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
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: