Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Calculated working hours

(0) ShareShare
ReportReport
Posted on 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

  • TheSlawekG Profile Picture
    119 on at
    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 at
    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
    2 on at
    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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1