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

Community site session details

Session Id : I/lxWrJnDfzDaMfiWcLFgs
Power Automate - Building Flows
Unanswered

How to calculate vacation balance, not including weekends and holidays

Like (1) ShareShare
ReportReport
Posted on 10 May 2022 13:36:14 by 7

Hello dear Colleagues!

Currently I'm working on leave management flow for a company.

And I'm struggling with such issue: how to calculate vacation balance, not including weekends and holidays?

I would like that users will choose a date from/to of their vacation and power automate could calculate vacation balance not including weekends and holidays. I hope that I've described the idea correctly.

Maybe someone have done already smth similar?

 

Thank you!

I have the same question (0)
  • abm abm Profile Picture
    32,506 Most Valuable Professional on 10 May 2022 at 13:46:16
    Re: How to calculate vacation balance, not including weekends and holidays

    Hi @daria_227 

     

    To find the day of the week there is an expression called dayofWeek() which returns value between 1 to 7

     

    Monday 1, Tuesday 2,.... Sunday 7

     

    image.png

     

    Expression I used above is dayofWeek(utcNow()). This will return todays day of the week. If you want to pass another date to check then pass the date instead of utcNow() function. See below.

     

    dayofWeek('2022-10-12')

     

    To find the other holidays you need to store those dates for the relevant year in SharePoint or Excel or some database. Query the data source with the date you want to check.

     

    Thanks

     

     

     

     

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 986 Moderator

#2
stampcoin Profile Picture

stampcoin 699 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 577 Super User 2025 Season 2

Loading complete