cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
Super User II
Super User II

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')

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
PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (3,844)