Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors