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 all,
I would like to calculate a moving annual total without a real date table.
My dates are cut in 13 periods a year from 202101 to 202113 for example.
So it is a 13 periods moving annual total and it can t be measured easily with the classical way.
I have a sales table and a "fake" calendar table.
In my calendar table i have add a calculated culumn with a "cumulative periode" from 1 to 65 (201701 to 202113) and with this i would like to have my moving annual total.
I'd like to give you a data sample but i can't post with tables inside my post.
But i can't find a way to make the measurement and have my MAT.
Thanks a lot for the help.
Regards
Paul
Solved! Go to Solution.
MAT =
VAR LastVisiblePeriod = MAX('calendar'[cum_period])
VAR Period =
FILTER(
ALL('calendar'),
'calendar'[cum_period] > LastVisiblePeriod -13 &&
'calendar'[cum_period] <= LastVisiblePeriod
)
RETURN
CALCULATE (
[Sales Amount],
Period
)
MAT =
VAR LastVisiblePeriod = MAX('calendar'[cum_period])
VAR Period =
FILTER(
ALL('calendar'),
'calendar'[cum_period] > LastVisiblePeriod -13 &&
'calendar'[cum_period] <= LastVisiblePeriod
)
RETURN
CALCULATE (
[Sales Amount],
Period
)
Hi JW,
This is perfect, thanks a lot.
Regards