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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Maheshguptaz
Helper III
Helper III

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

@Maheshguptaz , 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

@Maheshguptaz , 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
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Top Solution Authors