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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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]))
)
Hi,
Share some data and show the expected result.
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. : )
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 37 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 133 | |
| 88 | |
| 85 | |
| 68 | |
| 64 |