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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
zhamada
Regular Visitor

Date Problem with YTD

Fairly new to power BI, and I have a problem where my date table which relates a lot of my tables doesnt seem to be able to get YTD data for a yearly budget. Its almost as if when I make a measure to calculate it, the dates in my 'Budget' table aren't being recognized as dates. But when I put it into a visual it works fine with the master dates. I have tried quick measures as well and that returns a blank value.  I did have to append further dates to the date table to be able to show full budget, but idk if thats the problem. 

 

My goal is to be able to show the total amount of spend YTD (which hasn't been a problem), and a budget YTD in the same card. 

Here is how I was getting YTD spend 

Current YTD Spend = TOTALYTD(SUM(SPEND[Spend]), SPEND[Date])
When I use a similar formula for my budget table it does not actually get tyd but the whole year. 
 
The table is relating correctly on 2 other columns. 
 
What am I missing? 
zhamada_0-1691691682569.png

 

zhamada_1-1691691720196.png

 

 zhamada_2-1691691760372.png

 

2 REPLIES 2
amitchandak
Super User
Super User

@zhamada , It need to measure and you must use date table

 

example

YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD('Date'[Date],"12/31"))

 

YTD Sales = TotalYTD(SUM(Sales[Sales Amount]), 'Date'[Date])

 

Time Intelligence, Part of learn Power BI https://youtu.be/cN8AO3_vmlY?t=27510
Time Intelligence, DATESMTD, DATESQTD, DATESYTD, Week On Week, Week Till Date, Custom Period on Period,
Custom Period till date: https://youtu.be/aU2aKbnHuWs&t=145s

 

Why Time Intelligence Fails - Powerbi 5 Savior Steps for TI :https://youtu.be/OBf0rjpp5Hw
https://amitchandak.medium.com/power-bi-5-key-points-to-make-time-intelligence-successful-bd52912a5b...
To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.

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

Thank you for the help! While the solution you provided differed from the one that helped me solve my problem, it was certainly helpful and got me going in the right direction! 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.