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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
firstredpepper
Advocate II
Advocate II

Simple DAX Time Intelligence Question

Hi there,

 

Imagine you have a dataset of three months of data with a pre-calculated column for year-to-date, YTD (you do not have the full year because it's too large). What DAX pattern would you use to calculate YTD?

 

The challenge is if the measure is summarized for the year - the latest month YTD values should be shown, rather than summing the months together. I've gotten it to work using the DAX below, but I'm running into huge performance hits because of the MAX(Period) part. Thank you for your advice!

 

 

YTD_Costs = 
CALCULATE(SUM('Financials'[YTD_Cost]),
FILTER('Financials','Financials'[FiscalPeriod] = MAX(CalendarPeriods[FiscalPeriod]))
)

 

3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

 

Share some data and show the expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
ricardocamargos
Continued Contributor
Continued Contributor

Hi @firstredpepper,

 

Try this function:

 

https://msdn.microsoft.com/en-us/library/ee634400.aspx.

 

Be aware you should have a continuous date column to work with time intelligence functions. It's better you create a date dimension to work with that.

 

Ricardo

Thank you for the speedy reply Ricardo! I will try out your suggestion. : )

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.