cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

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
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

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

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors