[View:http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Components.UserFiles/00.00.02.89.41/xDays-for-forum.qvw]
Hi Guys,
I have a table that looks like below.
In the table you see the field "Date" and the field "xDays".
There are also the fields "IsHoliday" and "IsWorkDay". In both cases, the values to be EXCLUDED (Holidays and NON-Working days) are marked with "0".
What I need, is to add xDays to Date (disregarding Holidays and Non-Working days) and get the "Target Date".
In example for Date 01/10/2010, xDays is 2. Since 01/10/2010 and 02/10/2010 are non-working days, the target day should be 04/10/2010.
In the second case, Date=07/10/2010, xDays=3, target Date should be=12/10/2010.
How can I achieve that?
Thanks in advance,
Aldo.
Date | Day | IsHoliday | IsWorkDay | xDays |
27/09/2010 | Mon | | 1 | |
28/09/2010 | Tue | | 1 | |
29/09/2010 | Wed | | 1 | |
30/09/2010 | Thu | | 1 | |
01/10/2010 | Fri | | 0 | 2 |
02/10/2010 | Sat | | 0 | |
03/10/2010 | Sun | | 1 | |
04/10/2010 | Mon | | 1 | |
05/10/2010 | Tue | 0 | 1 | |
06/10/2010 | Wed | | 1 | |
07/10/2010 | Thu | | 1 | 3 |
08/10/2010 | Fri | | 0 | |
09/10/2010 | Sat | | 0 | |
10/10/2010 | Sun | | 1 | |
11/10/2010 | Mon | 0 | 1 | |
12/10/2010 | Tue | | 1 | |
13/10/2010 | Wed | | 1 | |