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
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
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.