Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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_DATE | BOOKING_DAY | BOOKING_WORKDAY |
---|---|---|
9/2/2014 | 2 | 1 |
9/3/2014 | 3 | 2 |
9/4/2014 | 4 | 3 |
9/5/2014 | 5 | 4 |
9/8/2014 | 8 | 5 |
9/9/2014 | 9 | 6 |
9/10/2014 | 10 | 7 |
10/1/2014 | 1 | 1 |
10/2/2014 | 2 | 2 |
10/3/2014 | 3 | 3 |
10/6/2014 | 6 | 4 |
10/7/2014 | 7 | 5 |
10/8/2014 | 8 | 6 |
10/9/2014 | 9 | 7 |
10/10/2014 | 10 | 8 |
Thanks,
Fabio
Hi,
one solution could be:
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
See this example
Thanks Enrique for share the file however I couldn't find nothing related to work days..
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.
See this file
Thanks Enrique.
However I'm planning to use this field as Dimension, reason that I can't use the function with above.
Fabio.
In this case, in my opinion, you need to calculate them in the charge script.
Hi,
one solution could be:
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
Got it.
Thanks Marco.
you're welcome
regards
Marco