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!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Not sure where I'm going wrong with this calculation, trying to calculate 12 month rolling figure total KwH
Any help much appreciated
this didn't initially work but I changed the calendar date to the date from the same table that the kwh data was in.
I was trying to use a date table for the date.
Is there a way of calculating the difference between the most recent 12 month period and the same 12 months in the previous year?
So I would want to see kwh consumption for the most recent 12 month period (currently Jan 23 to Dec 23) then would like to compare to kwh consumption during jan 22 to dec 22?
I know I could calculate a 24 month period and deduct the current 12 month figure. just wondering if theres a more streamlined way of doing this?
Thank you for your help
pls try this
CALCULATE(SUM('All sites data'[KwH]),DATESINPRIOD('Calendar'[Date], MAX(Calendar'[Date]), -12,MOUTH ))