Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Current Work Day

Guys,

I'm struggling with something that should be a quick aggr function with rank.

I have my booking dates and want to show it by WORK DAY. Like the example bellow.

How can I calculate the yellow column?

BOOKING_DATEBOOKING_DAYBOOKING_WORKDAY
9/2/201421
9/3/201432
9/4/201443
9/5/201454
9/8/201485
9/9/201496
9/10/2014107
10/1/201411
10/2/201422
10/3/201433
10/6/201464
10/7/201475
10/8/201486
10/9/201497
10/10/2014108

Thanks,

Fabio

Tags (3)
1 Solution

Accepted Solutions

Re: Current Work Day

Hi,

one solution could be:

QlikCommunity_Thread_140812_Pic1.JPG.jpg

tabBooking:

LOAD BOOKING_DATE,

    Day(BOOKING_DATE) as BOOKING_DAY,

    NetWorkDays(MonthStart(BOOKING_DATE), BOOKING_DATE) as BOOKING_WORKDAY

FROM [http://community.qlik.com/thread/140812] (html, codepage is 1252, embedded labels, table is @1);

hope this helps

regards

Marco

10 Replies
ecolomer
Honored Contributor II

Re: Current Work Day

See this example

Not applicable

Re: Current Work Day

Thanks Enrique for share the file however I couldn't find nothing related to work days..

ecolomer
Honored Contributor II

Re: Current Work Day

There as a function networkday(Ini,Fin) to count number of work days

If you use this function you can obtain if each date is work day or non.

ecolomer
Honored Contributor II

Re: Re: Current Work Day

See this file

Not applicable

Re: Re: Current Work Day

Thanks Enrique.

However I'm planning to use this field as Dimension, reason that I can't use the function with above.

Fabio.

ecolomer
Honored Contributor II

Re: Current Work Day

In this case, in my opinion,  you need to calculate them in the charge script.

Re: Current Work Day

Hi,

one solution could be:

QlikCommunity_Thread_140812_Pic1.JPG.jpg

tabBooking:

LOAD BOOKING_DATE,

    Day(BOOKING_DATE) as BOOKING_DAY,

    NetWorkDays(MonthStart(BOOKING_DATE), BOOKING_DATE) as BOOKING_WORKDAY

FROM [http://community.qlik.com/thread/140812] (html, codepage is 1252, embedded labels, table is @1);

hope this helps

regards

Marco

Not applicable

Re: Current Work Day

Got it.

Thanks Marco.

Re: Current Work Day

you're welcome

regards

Marco

Community Browser