cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
WynandCilliers
Frequent Visitor

YTD Sales WITHOUT Accumulation and LYTD for SAME period

Hi All,

I'm am trying to calculate a very basic calculation displaying YTD sales VS LYTD. 

These are my measures:

Sales YTD = CALCULATE(Sum(Sales[LineTotal]),DATESYTD('Calendar'[Date],"30/06"))
Sales LYTD2 = CALCULATE(SUM(Sales[LineTotal]),DATESYTD(dateadd('Calendar'[Date],-1,Year),"30/06"))

 

WynandCilliers_0-1621411426477.png

As per the above, the calculation accumulates which I dont want. I also do not want June displayed, as this is not YTD. It should stop at May.

 

1. How to I get rid of accumulation?

2. How do I display true YTD?

 

Thanks,

Wynand

4 REPLIES 4
rfigtree
Resolver III
Resolver III

How do you define ytd? Dax seems to be doing it right.

Year to date (YTD) refers to the period of time beginning the first day of the current calendar year or fiscal year up to the current date.

In my case, Fiscal year ending 30/06

Maybe you are missing interpreting what dax thinks the current date is. For example on the august row, the current date is the last t day of august, .... not today's date.

Please move on if you cannot assit me.

Helpful resources

Announcements
August 2022 update 768x460.jpg

Check it Out!

Click here to learn more about the August 2022 updates!

August 1 episode 9_no_dates 768x460.jpg

The Power BI Community Show

Watch the playback when Priya Sathy and Charles Webb discuss Datamarts! Kelly also shares Power BI Community updates.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Top Solution Authors
Top Kudoed Authors