cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
alhilo
Helper III
Helper III

Last day of the month

Hi Everyone

 

I have a flow that send an email one time on each month. " Please see the below link"

https://ibb.co/xJXyTK2

 

I need this flow to work in the last day of each month. So, my question is if I insert the start time 2020-10-31T06:00:00.000Z

 

in which day in the below months the flow will work

 

November/2020

December/2020

January/2021

February/2020

 

Thank you so much

 

3 REPLIES 3
Brad_Groux
Community Champion
Community Champion

You have a few different ways to determine the last day of the month.

Determine if today is the last day of the month, such as when you schedule a flow to run daily: 

If(Month(Today()) = Month(Today()+1), "Not Last Day Of Month", "Last Day Of Month")

Subtract from first day of the month, to get the last day of the month, for when you want to run flow on a schedule: 

subtractFromTime(startOfMonth(addToTime(utcNow(),1,'month')),1,'day')

The Time intelligence functions (DAX) has loads of ways to determine the time/day, including ENDOFMONTH, and ENDOFQUARTER.

If you could provide an expanded screenshot of your Flow and steps, your Flow run history, and of any detailed error messages you're receiving we could likely better assist you. Also, for the best results, you may want to review How to write a good forum post.

If this reply answers your question or solves your issue, please ACCEPT AS SOLUTION ☑️. If you find this reply helpful, please consider giving it a LIKE.

Thank you for your reply

 

could you please advise where I should write the below equation

 

subtractFromTime(startOfMonth(addToTime(utcNow(),1,'month')),1,'day')

Brad_Groux
Community Champion
Community Champion

You have a few options, including in an expression in a condition, a variable, or via a function. 

If this reply answers your question or solves your issue, please ACCEPT AS SOLUTION ☑️. If you find this reply helpful, please consider giving it a LIKE.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Users online (1,540)