Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
karunaramteke
Contributor III
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.

Please help.

Thank you in advance.

 

 

 

 

 

 

 

 

Labels (1)
2 Solutions

Accepted Solutions
tresesco
MVP
MVP

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

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

...

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

View solution in original post

tresesco
MVP
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', ...)

View solution in original post

4 Replies
tresesco
MVP
MVP

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

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

...

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

karunaramteke
Contributor III
Contributor III
Author

I also want to exclude public holidays from it

tresesco
MVP
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', ...)

karunaramteke
Contributor III
Contributor III
Author

Hi all,

 

Please help me to remove holidays dates using firstworkdate(),

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.