Forum Discussion
Anonymous
4 years agoNot 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 name | Created Date | Monday | Tuesday | Wednesday | Thursday | Friday | Saturday | Sunday | Working Days |
| Emp1 | 4/13/2022 13:05 | 0 | 0 | 8 | 8 | 8 | 8 | 8 | |
| Emp2 | 4/13/2022 13:05 | 8 | 8 | 8 | 8 | 8 | 0 | 0 | |
| Emp3 | 4/13/2022 13:05 | 5 | 5 | 5 | 5 | 5 | 0 | 0 | |
| Emp4 | 4/13/2022 13:05 | 6 | 6 | 6 | 6 | 6 | 0 | 0 | |
| Emp5 | 4/13/2022 13:05 | 8 | 8 | 0 | 8 | 8 | 0 | 8 | |
| Emp6 | 4/13/2022 13:05 | 0 | 7 | 7 | 7 | 7 | 7 | 0 | |
| Emp7 | 4/13/2022 13:05 | 4 | 4 | 4 | 0 | 0 | 0 | 4 | |
| Emp8 | 4/13/2022 13:05 | 0 | 8 | 0 | 0 | 8 | 8 | 0 | |
| Emp9 | 4/13/2022 13:05 | 7.5 | 7.5 | 7.5 | 7.5 | 7.5 | 0 | 0 |
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.
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
1 Reply
- amitchandakSuper 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