Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I have used the following Dax code for calculating the YTD amount fiscal year starting from April 1.
Sales FYTD =
CALCULATE (
[Total FactPriSales],
DATESYTD (
DimDate[Date],
"3/31"
)
)
But this gives me blank result. This is the model view
I have attached sample pbix file.
Thank you
Solved! Go to Solution.
@Anonymous ,Please find the attached file after the signature. I can see YTD reset after march. Marked Date table as Date table
@Anonymous ,
For Without slicer.
Please note that when you do NOT use the date slicer of a date filter, then the last date of the calendar will be taken as the date to end YTD.
Now you can stop your calendar today. As this was no created in power BI, You might not able to do that.
You have use filter/slicer in this case.
@Anonymous , This does not seem lik FY starting from April. The one you shared is for FY starting July. Try like
Sales FYTD =
CALCULATE (
[Total FactPriSales],
DATESYTD (
DimDate[Date],
"03/31"
)
)
Power BI — Year on Year with or Without Time Intelligence
https://medium.com/@amitchandak.1978/power-bi-ytd-questions-time-intelligence-1-5-e3174b39f38a
Dear @amitchandak
You are correct it was a mistake. But still, the code is not working
Hi, @Anonymous , DATESYTD() evaluates in current context instead of current date. You might want to use this measure to verify its actual range in current context.
test DatesYTD =
VAR __dates = DATESYTD ( DimDate[Date], "6/30" )
RETURN
MINX ( __dates, DimDate[Date] ) & UNICHAR ( 10 )
& MAXX ( __dates, DimDate[Date] )
Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
23 | |
8 | |
7 | |
6 | |
6 |
User | Count |
---|---|
28 | |
12 | |
10 | |
10 | |
6 |