Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hi all,
I am trying to make a very simple exercise with a verys imple model using the TOTALYTD DAX formula but there is something not working properly for me.
I have created the following measure:
Solved! Go to Solution.
That was very helpful! So apparently all that I was missing to make my thing work is to add ".[Date]" to my formula. Tried it and worked like a charm. Thanks!
Hi,
Create a Calendar Table with a relationship (Many to One and Single) from the OrderDate column to the Date column of the Calendar Table. In the Calendar Table, write calculated column formulas to extrat Year, Month name and Month number. Sort the Month name by the Month number. To every visual/filter, drag any date related field only from the Calendar Table. Write these measures:
Measure = SUM(OrderDetail[Sales])
YTD measure = calculate([measure],datesytd(Calendar[Date]),"31/12")
Hope this helps.
Thank you all for your messages. Does this mean I cannot use the TOTALYTD function unless I visualize the information at a date level (i.e. I cannot use it in a table grouping sales by month)?
it is possible like this:
That was very helpful! So apparently all that I was missing to make my thing work is to add ".[Date]" to my formula. Tried it and worked like a charm. Thanks!
I think you have to use ALL function. just try it, i am not sure.
YTDSales = TOTALYTD(SUM(OrderDetail[Sales]), ALL(OrderHeader[OrderDate]))
If I answered your question, accept it as solution and give kudos!
hi @ignasivb
Because TOTALYTD = CALCULATE + DATESYTD. In case of date hierarchy, you would need CALCULATE + DATESMTD, or CALCULATE + DATESQTD, so TOTALYTD is the same.
Hi @FreemanZ ,
Not sure how to apply this. I tried this measure and it won't work either:
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.