Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Anonymous
Not applicable

Moving annual total (MAT) without real date

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

 

 

1 ACCEPTED SOLUTION
JW_van_Holst
Resolver IV
Resolver IV

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
)

View solution in original post

2 REPLIES 2
JW_van_Holst
Resolver IV
Resolver IV

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
)
Anonymous
Not applicable

Hi JW,

 

This is perfect, thanks a lot.

 

Regards

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.