Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello, I started using PowerBI desktop a couple of months ago. It is set up for direct query and I have an appended query with a date which is single direction related to a Date Table. It will not properly calculate prior YTD and current YTD sales totals using the DAX langauge as below:
I have already checked that the edit query language shows the date field as date and it shows as date type as well.
Is this b/c I'm using Direct Query? I have not done much with calculate/DAX in general other than creating measures up to this point but I feel like this shoudl be fairly simple.
It is a date column in a date table I created that runs for several years starting with 1/1/2022.
I have a table with sales from 1/1/2022-8/31/2023, I update it monthly. I am trying to do a matrix visual that shows various time intelligent totals such as rolling 12 months sales, prior YTD and a variance of prior YTD vs Current YTD ultimately. I have started with Prior YTD and it gives me the below in the visual which is the entire prior year (2022), expecting 1/1/2022-8/31/2022 as that is the latest date in the HS Sales Date column of the 2022-2023 Health Systems table I had in my original post (which is the column I have related to the Day in the Date Table).
YTD Sales Formula as I originally did it:
Prior YTD:
@scarlet61980 day is a date column? Weird name though if that is the case. Based on the expression it should work. When you say not working, what does it mean? Wrong value, error? How do you display the measure in the visual?
It is not easy to answer the question based on vague reply, if you provide more details it will be helpful. Read this post to get your answer quickly.
https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
I had tried the "Day" also intially but that did not work either.
@scarlet61980 instead of using End of Month column it should be date column from the date dimension. I have full playlist on time intelligence you can check it here.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 59 | |
| 43 | |
| 42 | |
| 23 | |
| 17 |
| User | Count |
|---|---|
| 190 | |
| 122 | |
| 96 | |
| 66 | |
| 47 |