web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Fuction IF - I need help
Power Automate
Unanswered

Fuction IF - I need help

(0) ShareShare
ReportReport
Posted on by 102

I need help! I need to create a function that solves this need.

I have a file and I need to know : If it was created in the current month in the previous month or before the previous month

Example: A file is created in 30/11/2022, a result the fuction is previous month

Categories:
I have the same question (0)
  • Expiscornovus Profile Picture
    33,505 Most Valuable Professional on at

    Hi @jurunas2023,

     

    You could use a formatdatetime function with a MM format together with the Created property and compare it with the UtcNow function with the same MM format (after some calculation to determine the previous month). This way you can check if this is the previous month.

     

    Below is an example

    If the condition matches it will be the previous month and the flow will go to the If Yes section.

     

    formatdatetime(item()?['Created'], 'MM')

    is equal to

    formatdatetime(addDays(startofMonth(utcNow()), -1), 'MM')

     

    previousmonthcheck.png

     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 60 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 54

#3
Expiscornovus Profile Picture

Expiscornovus 47 Most Valuable Professional

Last 30 days Overall leaderboard