Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Date Difference Excluding weekends


Hi all

I want to be able to see how many working days are letf in a month, for example what I have below is;

But I want to remove the count for the weekend days or even just Sunday if possible.

Any ideas?

I want this as a caculated dimension in a pivot chart. 

=MONTH_END-today()

Thanks

Aidan

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

=CEIL(Interval(MonthEnd(Today())-Today(),'dd') -  Div(MonthEnd(Today())-Today(),7) + (weekday(Today()) > WeekDay(MonthEnd(Today()))))

View solution in original post

12 Replies
MK_QSL
MVP
MVP

Including Weekends.

=Interval(MonthEnd(Today())-Today(),'dd')

Excluding Weekends.

=NetWorkDays(Today(),MonthEnd(Today()))

anbu1984
Master III
Master III

=NetWorkDays(today(), Month_End)

Not applicable
Author

Thansk you this seems to have worked for me, is their anyway I can discount any day that is Sunday on this?

Thanks again,

Aidan

marcus_sommer

Unfortunately networkdays included no possibility for saturday or sunday. If you needs this you need a more complex expression which additionally counted these day. Easier will be to use a special field within the master-calendar like:

if(num(weekday(date)) = 6, 0 ,1) as working_day

and the use a simply sum(working_day) within your chart.

- Marcus

sebastiandperei
Specialist
Specialist

What you mean that you need as calculated dimention?

You want to see like one row by every "non sunday" day? What you have in MONTH_END field?

Not applicable
Author

  So the below is what I have but I want this to only exclude Sunday and include Saturday

Excluding Weekends.

=NetWorkDays(Today(),MonthEnd(Today()))

MK_QSL
MVP
MVP

What is meant by Discount Sunday?

Please elaborate little more on this !

Not applicable
Author

So I want to know how many working days are left in the month, so today being the 16th, we have 13 work days left including today but excluding the last 2 Sundays of the month.


MK_QSL
MVP
MVP

=CEIL(Interval(MonthEnd(Today())-Today(),'dd') -  Div(MonthEnd(Today())-Today(),7) + (weekday(Today()) > WeekDay(MonthEnd(Today()))))