Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

HELP CALCULATE OVERTIME

Guys, good afternoon!

I have a doubt when calculating overtime, I have this table below:

 

User NameProject NameInterval StartInterval End
User01Research and Development11/04/2022 08:0011/04/2022 12:07
User01Research and Development11/04/2022 13:1011/04/2022 17:06
User01Research and Development12/04/2022 07:2812/04/2022 12:01
User01Research and Development12/04/2022 13:0012/04/2022 20:31
User01Research and Development13/04/2022 07:5113/04/2022 12:01
User01DevOps13/04/2022 12:5313/04/2022 14:19
User01Research and Development13/04/2022 14:1913/04/2022 19:59
User02On-Line Schedule11/04/2022 08:0011/04/2022 12:00
User02On-Line Schedule11/04/2022 13:0011/04/2022 18:00
User02On-Line Schedule12/04/2022 08:0012/04/2022 12:00
User02Labs12/04/2022 12:5912/04/2022 17:20
User02On-Line Schedule13/04/2022 08:0013/04/2022 12:00
User02On-Line Schedule13/04/2022 13:0013/04/2022 13:30
User02Labs13/04/2022 13:3013/04/2022 13:45
User02On-Line Schedule13/04/2022 13:4513/04/2022 17:40


Where I have several hours of entry and exit on the same day.
And the workload is 8 hours, if it exceeds these 8 hours of work, it is already extra.
I'm racking my brains because I can't reduce the 8 hours of work from the total amount of hours, to leave only the overtime hours of the month.

Has anyone done this before and could help me out?

Thanks

1 ACCEPTED SOLUTION
v-eqin-msft
Community Support
Community Support

Hi @Anonymous ,

 

If you want to get total minutes for each progress, please try 

Duration.TotalMinutes()

Eyelyn9_0-1652146371500.png

 

And according to this: but i want after the duration, to separate the amount of overtime from the total amount. 

If you want to know how many projects are overtime, please firstly add the Date column in Power Query

DateTime.Date([Interval Start])

Eyelyn9_2-1652147078091.png

Then try:

Amount of overtime = 
var _t=SUMMARIZE('Table',[User Name],[Project Name],[Date],"Minutes",SUM('Table'[Minutes]))
return COUNTROWS(FILTER(_t,[Minutes]>8*60))

Eyelyn9_1-1652146988593.png

 

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

View solution in original post

3 REPLIES 3
v-eqin-msft
Community Support
Community Support

Hi @Anonymous ,

 

If you want to get total minutes for each progress, please try 

Duration.TotalMinutes()

Eyelyn9_0-1652146371500.png

 

And according to this: but i want after the duration, to separate the amount of overtime from the total amount. 

If you want to know how many projects are overtime, please firstly add the Date column in Power Query

DateTime.Date([Interval Start])

Eyelyn9_2-1652147078091.png

Then try:

Amount of overtime = 
var _t=SUMMARIZE('Table',[User Name],[Project Name],[Date],"Minutes",SUM('Table'[Minutes]))
return COUNTROWS(FILTER(_t,[Minutes]>8*60))

Eyelyn9_1-1652146988593.png

 

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

Anonymous
Not applicable

speedramps,

Thanks for the feedback,

I've done that, but i want after the duration, to separate the amount of overtime from the total amount.

speedramps
Super User
Super User

e cam you bettre explain the problem.

Perhaps with a example if the desired output foe the example input date.

 

Try use the Duraction command , for example ...

Duration.Minutes([Interval End] - [Interval Start])

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.