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

how to calculate Sundays and working days in month ?

Hi all,

i have small query current month has 30 days so i want calculate in this month  display only working days.

example :

this month has 30 days

i want display only 26 working days.

remaining are Sundays 4.

total  30 days 

working days= 26 .

Sundays     =4 .

so please tell me this requirement.

regards

subbu

5 Replies
deshikas
Contributor III
Contributor III

MonthEnd(DOC_DATE) as EOM_Date,

MonthStart(DOC_DATE) as Start_Date,

networkdays(Start_Date,EOM_Date ) + Floor((EOM_Date - Start_Date )/7 ) +if(WeekDay( WeekStart(EOM_Date))='Sat' ,1,0) as No_Days, 

Above should work. Network Days count (Mon_Fri) then Add no of Saturdays

bindu_apte
Creator III
Creator III

Hi,

Hope this thread will help you.

Re: Exclude weekend days

vikasmahajan

Hi,

You need to create a calender Please check this thread Business Working Hours Calculation

https://community.qlik.com/docs/DOC-8530,

Difference between days excluding weekends and holidays?

with Network days function

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
avinashelite

Try like this, ass a column in your

calendar script like weekday(date) as day_name

in front end add the expression : count({<day_name - ={Sun}>}Date)

senpradip007
Specialist III
Specialist III

Have a look at the sample qvw. Hope it will help.