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
Anonymous
Not applicable

Previous Fiscal Year automatically

Hi Power BI Community!
I have these two cards:

Beginner_2020_0-1623388988256.png

 

Fiscal Year Measure =  TOTALYTD([Rate (monthly)],Dates[Date],"9/30") 

My Fiscal Year starts at 01.10 till 30.09. Everything works right but now I also want to show the last Fiscal Year.

I use the advanced filter on date = Date is before 01.10.2020. But this will not work for next fiscal year.
The relativ date filter does only have year and calendar year but not Fiscal Year.

What can I do?

1 ACCEPTED SOLUTION
ERD
Super User
Super User

Hi @Anonymous ,

You can try this

Prev FY =  
CALCULATE (
    [Rate (monthly)],
    SAMEPERIODLASTYEAR ( DATESYTD ( Dates[Date], "9/30" ) )
)

If this post helps, then please consider Accept it as the solution ✔️to help the other members find it more quickly.

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Appreciate your Kudos.

Check out my latest demo report in the data story gallery.

Stand with Ukraine!


Here are official ways you can support Ukraine financially (accounts with multiple currencies):
1) Support the Armed Forces of Ukraine: https://bank.gov.ua/ua/about/support-the-armed-forces
2) Come Back Alive foundation: https://www.comebackalive.in.ua/

Thank you!

View solution in original post

3 REPLIES 3
ERD
Super User
Super User

Hi @Anonymous ,

You can try this

Prev FY =  
CALCULATE (
    [Rate (monthly)],
    SAMEPERIODLASTYEAR ( DATESYTD ( Dates[Date], "9/30" ) )
)

If this post helps, then please consider Accept it as the solution ✔️to help the other members find it more quickly.

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Appreciate your Kudos.

Check out my latest demo report in the data story gallery.

Stand with Ukraine!


Here are official ways you can support Ukraine financially (accounts with multiple currencies):
1) Support the Armed Forces of Ukraine: https://bank.gov.ua/ua/about/support-the-armed-forces
2) Come Back Alive foundation: https://www.comebackalive.in.ua/

Thank you!

BA_Pete
Super User
Super User

Hi @Anonymous ,

 

You'll need to set up a calendar table that has fields for your fiscal year in it. Relate calendar[Date] to factTables[Date].

 

Your fiscal year field will look something like this when implemented in Power Query:

addFinYear = Table.AddColumn(addDateKey, "finYear", each Date.Year([date]+#duration(275,0,0,0))),

 

In this example, the '+#duration(275,0,0,0)' part is adding 275 days to the calendar row date as my fiscal year increases on 1st April of the calendar year. You can adjust the number of days here to something like 92 (maybe 93) to increase the fiscal year at 1st October on the calendar row.

 

Once you have that, you create a relative fiscal year field something like this:

addRelativeFY = Table.AddColumn(addFinYear, "relativeFY", each [finYear] - Date.Year(Date.Today+#duration(275,0,0,0))),

 

Again, you adjust the #duration section to the number of days between 1st October and 1st January.

You can then use this relative fiscal year field in filters and calculations, for example:

_salesLY = 
CALCULATE(
  SUM(yourTable[Sales]),
  calendar[relativeFY] = -1
)

 

Setting up a proper calendar table and relating it to your fact tables will also allow you to use time intelligence functions such as SAMEPERIODLASTYEAR if you just want the relative LY period, just make sure to use the calendar[Date] field in function arguments instead of factTables[Date].

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Washivale
Resolver V
Resolver V

@Anonymous : try with

Last FY : Calculate([Fiscal Year Measure],SAMEPERIODLASTYEAR(Dates[Date]))

 

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.

Top Solution Authors