Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

Total for Sales YTD measure is incorrect

Hi all,


I have a calculated measure for YTD and YTD last year presented in a table. The issue is that the totals are incorrect (for last year's YTD), as seen on the picture below, however the chart shows the correct values. I also want to present the last years YTD per customer, but then these values also show up as incorrect when comparing it to the numbers in the data source, and I assume the solution to this problem is the same as the latter.




Measures used:


I need the values to be shown correctly so I can make further calculations. I know the issue with incorrect totals is a common issue, but I can't seem to find a solution to my exact situation. Any help would be much appreciated! Thanks in advance.
Super User IV
Super User IV

@Joachim2108 , Try last year YTD like


Last YTD Sales = CALCULATE(([SUM OF REVENUE],DATESYTD(dateadd('Date'[Date],-1,Year),"12/31"))


make sure date table is marked as date table

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

Hi @amitchandak , the table is indeed marked as the date table. I have also tried the alternative DAX query, however it gives me the same result. the YTD for individual dates are correct, however the total sum is incorrect - same thing when presented in a card visual for example.

I'm quite new to DAX, but I've seen others with similar issues solve the problem using VAR in their statements, which I'm still trying to understand. Hopefully that can give an indication of what to do.

Thanks in advance for any help!

Hi @Joachim2108 

I guess if you misunderstood the concept of YTD and the total sum? YTD is a cumulative total from the start of a year to a specific date point. If you want to show the correct YTD values in the table, you need to include date or month column in the table to tell the measure which date or month is the end point for the sum. You can convert your line chart into a table visual to check the result. I think it will show the correct YTD values.


Kindly let me know if you have any questions so that we can investigate a proper solution further.

Community Support Team _ Jing
If this post helps, please Accept it as the solution to help other members find it.

Helpful resources

MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

July 2021 Update 768x460.png

Check it out!

Click here to read more about the July 2021 Updates

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Top Solution Authors
Top Kudoed Authors