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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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