Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
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:
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
72 | |
71 | |
55 | |
37 | |
31 |
User | Count |
---|---|
87 | |
62 | |
61 | |
49 | |
45 |