Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for
Did you mean:
Contributor III

## t-1 to t-10

Hi QlikExperts,

I want t-1, t-2, t-3, t-4, t-5, t-6,t-7, t-8 , t-9 and t-10 dates.

If saturday sunday comes in between it should pick fridays value in variable.

I dont have date field, I want to calculate it on todays date.

Labels (1)
• ### QlikView

2 Solutions

Accepted Solutions
MVP

t-1 : =Firstworkdate(Today(),1+1)

t-2 :=Firstworkdate(Today(),2+1)

...

t-10 :=Firstworkdate(Today(),10+1)

MVP

You can pass those dates in the function as list of holidays as third parameter like:

Firstworkdate(Today(),2+1, '1/9/2020', '2/7/2020', ...)

4 Replies
MVP

t-1 : =Firstworkdate(Today(),1+1)

t-2 :=Firstworkdate(Today(),2+1)

...

t-10 :=Firstworkdate(Today(),10+1)

Contributor III
Author

I also want to exclude public holidays from it

MVP

You can pass those dates in the function as list of holidays as third parameter like:

Firstworkdate(Today(),2+1, '1/9/2020', '2/7/2020', ...)

Contributor III
Author

Hi all,

I have used below expression :

vToday = Date(Firstworkdate(Today(),1+1,'04-03-2019','21-03-2019','19-04-2019','01-05-2019','15-08-2019','02-09-2019','02-10-2019','08-10-2019','28-10-2019','25-12-2019','15-01-2020','21-02-2020','10-03-2020','10-04-2020','01-05-2020','01-09-2020','02-10-2020','26-10-2020','16-11-2020','25-12-2020','21-08-2020'),'DD-MM-YYYY');

But in above expression, it does not remove holidays dates.

please refer attached qvw for reference.

Community Browser