Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

flow to put into appropriate fiscal year folder in document library

(0) ShareShare
ReportReport
Posted on by

I'm looking to set up a flow that determines which fiscal year (which starts after September 30 each year) a date column falls under, then place that item in the appropriate fiscal year folder in a document library. For example, if the date is 7/15/24, it will go into the Fiscal Year 24 folder of the document library. Is there a way to set this up without doing a conditional for each fiscal year?

  • bottledutopia Profile Picture
    on at
    Re: flow to put into appropriate fiscal year folder in document library

    Thanks for the response. With this flow, I would only be able to categorize the current and next fiscal year, correct? Is there a way to set up more than two years without setting up a conditional for each year?

  • David_MA Profile Picture
    11,531 Super User 2025 Season 1 on at
    Re: flow to put into appropriate fiscal year folder in document library

    You will need to adapt this to your specific needs, but you can try this:

    David_MA_0-1718908562642.png

    The expression in the condition is the following. Replace triggerBody()['date'] with the dynamic date value that determines the fiscal year. It will return a number for the month. If it returns 1-8 it is the current fiscal year, otherwise it is the following fiscal year.

     

    int(formatDateTime(triggerBody()['date'],'MM'))

     

    For the folder path expression, use the following for the current year:

     

    concat('/fiscalyear/', formatDateTime(triggerBody()['date'],'yyyy'))

     

    Note: first use the folder picker to select the document library on your SharePoint site, and then paste that into the expression. For example, the document library I tested this on is 'fiscalyear'; be sure to include the backslashes.

     

    For the next fiscal year, use this expression:

     

    concat('/fiscalyear/', string(add(int(formatDateTime(triggerBody()['date'],'yyyy')),1)))

     

    Again, do the same as above for the document library and folder path. This expression gets the current year and adds 1 to it.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 566 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 516 Super User 2025 Season 1

#3
stampcoin Profile Picture

stampcoin 492