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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

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
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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

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