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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Tomek1982
Helper I
Helper I

Rolling12 not calculating correctly

Hi,

I have an issue with rolling 12 months calculation which is not working and I do not see the error in the formula. Can anyone support?

 

2023-05-22_14-33-06.jpg

2 REPLIES 2
amitchandak
Super User
Super User

@Tomek1982 , if you table do not have date create it using month year

 

date = date(left([Year/Month],4), right([Year/Month],[Year/Month],2),1)

 

join date of table with date of date table (or have date key in both YYYYMMDD)

 

post that try this for rolling 12 measure 

Rolling 12 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date],MAX('Date'[Date]),-12,MONTH))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi @amitchandak 

What I found out is that calculation was correct, but the issue is actually with a way the visualisation is done.

Tomek1982_0-1685432195570.png

Tomek1982_1-1685432207196.png

The only difference between those 2 graphs: upper correct and lower not correct is if there is a date or date chierarchy used. Do you know if there is any solution for that?

 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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