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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Anonymous
Not applicable

Help with calculating average of previous 12 months

Hello,
Please, as it is indicated in this two attached files below, I would like to display the sum of the last 12 months, ie when I tick in my report the month of May and I check the year 2018 , I would like to calculate the average of last 12 months by counting of May (ie of me from June 2017 -> May 2018).
PS: When I select the year, the result becomes wrong

But as you look in the attached files below, for the normal sum formula and the sum of last 12 months always I had the same result when I select the year !!!!! which is too weird.
Look at these two attached files below.

Thank you a lot.
Cordially.Figure1.PNGFigure2.PNG

1 REPLY 1
TomMartens
Super User
Super User

Hey,

 

please allow to me to direct your attention to this article: https://www.daxpatterns.com/time-patterns/

This article provides examples for almost every date related calculations.

 

It's a common best practice to create a dedicated calendar table, sometimes it's not just recommended but it becomes necessary.

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

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.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors