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

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.

Reply
JohnSalt
Helper I
Helper I

YTD figure not working with month name in matrix

Hi

I have a measure for year to date cost variance: 
YTD Variance = CALCULATE ( [Variance], ALL(PERIODS[MonthName]), All(PERIODS[PD_PERIOD]), PERIODS[PD_PERIOD]<= MAX(PERIODS[PD_PERIOD]))
This works fine with a matrix where I have period in the columns, period being the finanical month number starting at 1 for April in UK.

I have a calculated column for month name in the same table which is just calculated from the period number:
MonthName = FORMAT(DATE(1, IF([PD_PERIOD]<9,PERIODS[PD_PERIOD]+3,PERIODS[PD_PERIOD]-9), 1), "MMM")
and as soon as I switch from period to month name in the matrix columns it stops giving a rolling total and gives an in month figure despite me adding in the "All(PERIODS[MonthName])" to the calculate filter?

 

Any ideas?

1 REPLY 1
lbendlin
Super User
Super User

Your data model needs a proper calendar table, marked as such. If your fact table doesn't have dates you need to add a fake date column (for example first day of the month).  Don't try to do time intelligence without a calendar table.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

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

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.