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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
ajitsahoo8338
Helper III
Helper III

How to calculate the working days of each employees excluding weekends?

Employee Name DateWork Hrs
Ajith8/1/202416.00
Ajith8/2/202416.00
Ajith8/5/202412.00
Ajith8/6/202413.00
Ajith8/7/202416.00
Ajith8/8/202416.00
Ajith8/9/202416.00
Ajith8/12/202416.00
Ajith8/13/202416.00
Ajith8/14/202414.00
Ajith8/15/202416.00
Ajith8/16/202416.00
Ajith8/19/202416.00
Ajith8/20/202416.00
Ajith8/21/202416.00
Ajith8/22/202416.00
Ajith8/23/202416.00
Ajith8/24/20240.00
Ajith8/26/202410.00
Ajith8/27/202410.00
Ajith8/28/20242.00
Ajith8/29/20242.00
Ajith8/30/20242.00
Amy8/1/20248.00
Amy8/2/20248.00
Amy8/5/20248.00
Amy8/6/20248.00
Amy8/7/20248.00
Amy8/8/20248.00
Amy8/9/20248.00
Amy8/12/20248.00
Amy8/13/20249.00
Amy8/14/20249.80
Amy8/15/202410.00
Amy8/16/20248.00
Amy8/19/20248.00
Amy8/20/20247.00
Amy8/21/20249.00
Amy8/22/20248.00
Amy8/23/20248.00
Amy8/26/20248.00
Amy8/27/20248.00
Amy8/28/20240.00
Amy8/29/20240.00
Amy8/30/20240.00

 

My Table looks like this. My requirement is calculate working days of each employees excluding weekends. How can I acieve this?

 

Thank You

Ajit

1 ACCEPTED SOLUTION

Hi @ajitsahoo8338 ,

I think it is working fine.

 

From 20th AUgust to 27th August, there are 8 days. Excluding saturday and sunday that comes in those days, it is 6 working days.

 

One more example is given below for the same case

Thejeswar_0-1724924406773.png

 

Between 16th August and 27th August, there are 12 days with 2 saturdays and 2 sundays. The Working days in this case is shown as 8 excluding the 4 weekend days

 

Regards,

View solution in original post

3 REPLIES 3
Thejeswar
Super User
Super User

Hi @ajitsahoo8338 ,

Create a new column to identify the weekday using the below DAX

Weekday = WEEKDAY('Table'[Date], 1)

Then Create a measure as shown below

Workingdays = CALCULATE(DISTINCTCOUNT('Table'[Date]), AND('Table'[Weekday] <> 1, 'Table'[Weekday] <> 7))

Thejeswar_0-1724920825441.png

Ajit has 23 days, but workingdays measure returns 22 exluding the saturday in the list

 

Regards,

Hello @Thejeswar Thank you for your response. The measure is working fine but If filter any date then working days is not showing correctly Like Below. Total should show 12 

ajitsahoo8338_0-1724922479227.png

 

Hi @ajitsahoo8338 ,

I think it is working fine.

 

From 20th AUgust to 27th August, there are 8 days. Excluding saturday and sunday that comes in those days, it is 6 working days.

 

One more example is given below for the same case

Thejeswar_0-1724924406773.png

 

Between 16th August and 27th August, there are 12 days with 2 saturdays and 2 sundays. The Working days in this case is shown as 8 excluding the 4 weekend days

 

Regards,

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors