Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
soha1902
Creator
Creator

Only WeekDays Count

Hi All,

I am Having StartDate and FinishDate dimension. For using (FinishDate - StartDate) I am calculating the TotalDuration of a particular work.

See below:

Scr1.png

As per my requirement I want to calculate only weekdays. For example Work(1) StartDate is 1/4/2010 means from Monday work was started and 1/7/2010(Wednesday) it was closed so its showing Total Duration =4 which is correct. Now for work(2), startdate was 1/5/2010(Tuesday) and CloseDate was 1/13/2010 (Wednesday) means 7(After excluding Weekends) but result was showing 9 which is not correct.

Please help.......

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Use the networkdays function: networkdays( Start, Finish)


talk is cheap, supply exceeds demand

View solution in original post

3 Replies
Gysbert_Wassenaar

Use the networkdays function: networkdays( Start, Finish)


talk is cheap, supply exceeds demand
Not applicable

Hi Soha,

As Gysbert says, you can use network days to calculate this, you also have a third parameter in this with the option of adding in holiday dates too, so these days are excluded from the calculation (just like weekend dates)

hope that helps

Joe

saumyashah90
Specialist
Specialist

=NetWorkDays(Start,Finish) this will surely work

1) NetWorkDays basically calculates all working days from the given dates .Removing Saturdays and Sundays.

2)Remember that it doesnt include public holidays.You may have to add public holidays externally.