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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

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
Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

Top Kudoed Authors