Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Distinct business days count in specified month

Hi All,

        We have a data model like below:

CALENDAR_DATEMOST_RECENT_BUSINESS_DATE
12/1/201211/30/2012
12/2/201211/30/2012
12/3/201212/3/2012
12/4/201212/4/2012

When we are doing Count(distinct (MOST_RECENT_BUSINESS_DATE)) then we are getting 3 number but asper my requirement we want to get only  2 since 11/30 is the date from last month.

Can you guys help me constructing correct expression to get this data?.

QVW has been attached..

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Maybe like

=count(DISTINCT if(month(MOST_RECENT_BUSINESS_DATE)=month(CALENDAR_DATE), MOST_RECENT_BUSINESS_DATE))

or have a look at the NetWorkdays() function in QV help, which might calculate the number you need.

View solution in original post

1 Reply
swuehl
MVP
MVP

Maybe like

=count(DISTINCT if(month(MOST_RECENT_BUSINESS_DATE)=month(CALENDAR_DATE), MOST_RECENT_BUSINESS_DATE))

or have a look at the NetWorkdays() function in QV help, which might calculate the number you need.