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: 
madnanansari
Creator
Creator

Number of working days during a month

I am working on Retail Sales data.

In some cities the stores works 7 days whereas in some they work 6 days a week and 5 days a week as well. My requirement is to find out the number of working days for a specific store during a month.

I am using standard master calendar.

The below are the table formats:

City:

-CityID

-City

Store:

-StoreID

-CityID

City Operational Days:

CityID

Operational Day. (Sat, Sun, Mon etc)

4 Replies
Anonymous
Not applicable

Maybe something like this

=count({<

     Date= {"=match(weekday(Date),'Tue','Thu','Sat')"} ,

     Month={'Jan'}

          >} Date)

madnanansari
Creator
Creator
Author

There is a table where the working days are listed as below:

City Work Days:

City   :  Day

NewYork: Mon

NewYork: Tue

NewYork: Wed

NewYork: Thu

NewYork: Fri

LosAngeles: Mon

LosAngeles: Tue

LosAngeles: Wed

LosAngeles: Thu

LosAngeles: Fri

LosAngeles: Sat

The formula should look into this table.

isingh30
Specialist
Specialist

Try Network Days function -

networkdays (start_date, end_date [, holiday])

Example -

   You need to specify the holidays in networkday().

   For example you want networkdays between 2006-12-18 and 2006-12-31.

   If you just give this without the specific holidays you will get 10 as output.

   But say you have holiday on 2006-12-25 and 2006-12-26

   Then specify like this

   networkdays ('2006-12-18', '2006-12-31', '2006-12-25', '2006-12-26')

 

   and you will get answer as 8.

Thanks.

Anonymous
Not applicable

You'll probably need something like this then :

=count({<

Date= {"=match ( weekday(Date) , $(=concat( chr(39) & Day & chr(39), ',')) )"}

    >} Date)

I expect you'll need to adjust it to fit in with your precise data model.

If you have problems with it then post a sample qvf.