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
tstackhouse
Helper III
Helper III

Previous Fiscal YTD DAX Not working

I need to calculate Previous Fiscal Year to date vs Current Fiscal Year to date.

Right now I have Fiscal YTD by: 

Fiscal YTD Net Sales = totalytd(sum(VDC_EDW[Net_Sales_Amount]),'Calendar Table'[Date],"3/31")
^ This calculation works correctly
 
Then I try to get Previous Fiscal Yead to Date with the following:
Fiscal PYTD Net Sales = calculate([Fiscal YTD Net Sales],DATEADD('Calendar Table'[Date],-1,YEAR))
^ This Calculation does not work
 
Given that today is 1/19/2020.
I am seeing 4/1/2019-1/19/2020 for current Fiscal YTD.(Which is what I need)
I would expect to see 4/1/2018-1/19/2019 for previous fiscal year to date but I am not getting that result.
 
 
1 ACCEPTED SOLUTION
VasTg
Memorable Member
Memorable Member

@tstackhouse 

 

Please try this..

 

Fiscal YTD Net Sales = CALCULATE(sum(VDC_EDW[Net_Sales_Amount]),DATESYTD('Calendar Table'[Date],"3/31"))
 
Then to get Previous Fiscal Yead to Date with the following:
Fiscal PYTD Net Sales = calculate([Fiscal YTD Net Sales],SAMEPERIODLASTYEAR('Calendar Table'[Date]))
 
If this helps, mark it as a solution.
Kudos are nice too
Connect on LinkedIn

View solution in original post

11 REPLIES 11

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.