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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
ROCKYDO12
Helper III
Helper III

YTD Multi-year comparison

I have a YTD calculation which is working when doing a milti year comparision. For example if I select my fiscal year range filter and compare 5 years in a chart my amunts will be filtered by YTD. I want this calcuate my YTD based on last sales date in data set and not date as of today. How can I get this formula to give me my outcome:

YTD Amount =
VAR _SOY="04/01/" & YEAR(TODAY())
VAR _DOY=DATEDIFF(_SOY,TODAY(),DAY)
VAR SPPY=
CALCULATE(sum('Table'[Amount]),FILTER('Calendar','Calendar'[Day of Fiscal Year Number]<=_DOY))
RETURN
SPPY

 

 

1 REPLY 1
Anonymous
Not applicable

@ROCKYDO12 Could you please share a sample data with the output that you are expecting it to be.

 

Thanks,

Mohan V.

Helpful resources

Announcements
September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.