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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Yunka
Frequent Visitor

Last YTD DAX calculation by Fiscal Year

I have a dax calculation for running fiscal year total for the last YTD. Our fiscal year begins 6/1. This calculation works if I have a month slicer however if I don't want a month slicer, I want the calculation to work to the current point in time of the fiscal year. This calculation is giving me the amount for the full fiscal year for prior year, not up until the month we're currently in (I only want to see June through August for last year). Here's my DAX formula:

 

LYTD Invoiced:=CALCULATE([Invoiced Total], DATEADD(DATESYTD(Calendar[Period End Date], "6/01"), -1, year))

 

Thanks in advance for your help!

1 ACCEPTED SOLUTION
lalthan
Resolver II
Resolver II

If your calendar has the full period for current fiscal year and you don't have a time slicer, then it will always calculate and compare with whatever dates are available in your current financial year . You can add one more filter which filters the last date that you want the comparison to be done. e.g. lastnonblank(Period[Date],[whatever measure that you are tracking]).

 

Otherwise, you can restrict your calender table to populate data till whatever date you want the comparison to be done

View solution in original post

1 REPLY 1
lalthan
Resolver II
Resolver II

If your calendar has the full period for current fiscal year and you don't have a time slicer, then it will always calculate and compare with whatever dates are available in your current financial year . You can add one more filter which filters the last date that you want the comparison to be done. e.g. lastnonblank(Period[Date],[whatever measure that you are tracking]).

 

Otherwise, you can restrict your calender table to populate data till whatever date you want the comparison to be done

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.