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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Sashwato
Helper II
Helper II

Calculate consecutive working days and working hours

Hello all,

 

I am in need of help to work this solution out. We are having a dataset that we pull in currently with the information about Employees. The table contains the following details:

1. Name of the employee

2. Date

3. Start Time

4. End Time

5. Number of hours worked (if any)

 

The questions is: How do you calculate how many times a person worked 5 days in a row and overall over 40 hours in those 5 days?

Let me know if anyone has any idea. Will be highly appreciated!

 

Regards!

3 REPLIES 3
v-henryk-mstf
Community Support
Community Support

Hi @Sashwato ,

 

Workaround:

According to your needs, it can be reproduced in powerbi desktop. First, you can filter out the working days in the date, and then use dax to create a measure to obtain the cumulative value of "end time-start time" in the working day.

 

If there is still a problem, can you provide a test data model and a screenshot of the expected result, so that I can do further testing and solve your problem as soon as possible.


Looking forward to your reply.

Best Regards,
Henry

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

Hi Amit,

 

I looked through your links. Any idea how I can map the same keeping in mind Employees names. In your tutorial link, I am unable to get an idea on New Start Date, New End Date and Continuous Date Calculated columns created.

 

Regards!

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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