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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.