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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

working days calculation

Hi,

I'm looking for a calculation to perform a task that would give me a number of working days for each employee. Below is the sample data

 

Emp nameCreated DateMondayTuesdayWednesdayThursdayFridaySaturdaySundayWorking Days
Emp14/13/2022 13:050088888 
Emp24/13/2022 13:058888800 
Emp34/13/2022 13:055555500 
Emp44/13/2022 13:056666600 
Emp54/13/2022 13:058808808 
Emp64/13/2022 13:050777770 
Emp74/13/2022 13:054440004 
Emp84/13/2022 13:050800880 
Emp94/13/2022 13:057.57.57.57.57.500 

 

I've tried using different formulas but I couldn't get the right number.

 

I'd need to count the numbers by eliminating "0" from the count.

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , a new column like

if([Monday]>0,1,0) + if([Tuesday]>0,1,0) + if([Wednesday]>0,1,0) + if([Thursday]>0,1,0) + if([Friday]>0,1,0) + if([Saturday]>0,1,0) + if([Sunday]>0,1,0)

 

 

Another way is to unpivot the weekday's column

https://radacad.com/pivot-and-unpivot-with-power-bi

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@Anonymous , a new column like

if([Monday]>0,1,0) + if([Tuesday]>0,1,0) + if([Wednesday]>0,1,0) + if([Thursday]>0,1,0) + if([Friday]>0,1,0) + if([Saturday]>0,1,0) + if([Sunday]>0,1,0)

 

 

Another way is to unpivot the weekday's column

https://radacad.com/pivot-and-unpivot-with-power-bi

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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.