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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
jtgriffin
Frequent Visitor

TotalYTD formula for different fiscal year

Hello Everyone, 

 

I have an issue where my fical year is calculated incorrectly due to our fiscal year starting 10/1/2019 and ending 9/30/2020. 

 

I have a measure that is calcluating Actual (This Period), which is as follows:

Actual (TP) = SUM(Actuals[Amount (adj)])
This formula takes inputs from my actuals input tab (excel) and calculates for the current period. 
 
Now I have a Actual (YTD) formula, that ideally I would like to calculate from 10/1/2019 - 9/30/2020. However it is currently calculating from 1/1 to 12/31, normal fiscal year. Here is the formula:
Actual (YTD) = TOTALYTD([Actual (TP)],'Date'[date])
 
So that formula is taking my previous formula for actuals, Actual (TP), and trying to add them together using my date tab in excel. But currently I get 1/1 to 12/31 fiscal year outputs. 
 
My date table is posted below. Please let me know how I can fix this issues. Thank you!
Capture.PNG
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

Total ytd can take year end

Actual (YTD) = TOTALYTD([Actual (TP)],'Date'[date],"9/30")

Actual (LYTD) = TOTALYTD([Actual (TP)],dateadd('Date'[date],-1,year),"9/30")

 

These are some datesytd example

YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(('Date'[Date]),"9/30"))
This Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD((ENDOFYEAR('Date'[Date])),"12/319/30"))

Last YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(dateadd('Date'[Date],-1,Year),"9/30"))
Last YTD complete Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(ENDOFYEAR(dateadd('Date'[Date],-1,Year)),"9/30"))
Last to last YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(dateadd('Date'[Date],-2,Year),"9/30"))
Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-1,Year))
Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

Total ytd can take year end

Actual (YTD) = TOTALYTD([Actual (TP)],'Date'[date],"9/30")

Actual (LYTD) = TOTALYTD([Actual (TP)],dateadd('Date'[date],-1,year),"9/30")

 

These are some datesytd example

YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(('Date'[Date]),"9/30"))
This Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD((ENDOFYEAR('Date'[Date])),"12/319/30"))

Last YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(dateadd('Date'[Date],-1,Year),"9/30"))
Last YTD complete Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(ENDOFYEAR(dateadd('Date'[Date],-1,Year)),"9/30"))
Last to last YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(dateadd('Date'[Date],-2,Year),"9/30"))
Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-1,Year))
Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Can I have similar syntax for QTD(Sep,Oct,Nov-Q1....) and HYTD(Sep,Oct,Nov,Dec,Jan,Feb,Mar-HYTD) (Fiscal Year starts from Sep-Aug)

Thank you, I wasnt aware of that formula and it worked perfectly!

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.