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 : SWnK8pQj4sEaegdQYUPWxl
Power Automate - Building Flows
Unanswered

Calculated working hours

Like (0) ShareShare
ReportReport
Posted on 18 Sep 2019 13:32:57 by 119

Hi,

 

I have a calculated field that calculates how many hours an employee has been working.

hours.PNG

The formula is:

=IF([Time Out]="","0",TEXT([Time Out]-[Time In],"h"))

 

I'd like to add 2 conditions to it; I could do this in separate columns but I'd like to have it as one formula.

Basically, I need to deduct breaks time so IF Hours per Shift < 11.5 then -0.5h and IF Hours per Shift > 11.5 then -1.5h

 

How I can put in in one formula?

 

Thank you.

 

Slawek

I have the same question (0)
  • TheSlawekG Profile Picture
    119 on 19 Sep 2019 at 12:31:52
    Re: Calculated working hours

    Hi,

     

    thank you for your reply Guys.

     

    I'm working on a Flow using this SP List and by mistake, I published my question here.

     

    Cheers.

     

    Slawek

  • RezaDorrani Profile Picture
    12,141 on 18 Sep 2019 at 15:54:16
    Re: Calculated working hours

    Hi @TheSlawekG 

     

    MS Flow will not be able to understand calculate columns because they are calulcated at run time

    You would first have to perform the same calculatation as your calculated column in Flow

     

    In your case you would have to compare 2 dates to get the difference in hours

     

    Check my blog post on how to do this in Flow

    https://powerusers.microsoft.com/t5/Microsoft-Flow-Community-Blog/Flow-Calculate-Date-Diference/ba-p/135306

     

    Next once you get the differnece

    You cna use a simple if expresison to compare the dates and accordingly add or subtract your 30 mins and 1.5 hrs

     

    use addminutes function to do so

     

    Regards,

    Reza Dorrani

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

  • PieterVeenstra Profile Picture
    11 on 18 Sep 2019 at 14:08:48
    Re: Calculated working hours

    Hi @TheSlawekG 

     

    Is this really a Flow problem? It looks like you are doing this all in SharePoint.  Why not simply add a break in and a break out field and then include this in your calculation.

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…

MS.Ragavendar – Community Spotlight

We are honored to recognize Ragavendar Swaminatha Subramanian as our September…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 736 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 396 Moderator

#3
Power Apps 1919 Profile Picture

Power Apps 1919 339

Last 30 days Overall leaderboard
Loading started
Loading complete