Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Prasad1318
Contributor II
Contributor II

Workday Function from Excel to qliksense

Hello

I have a situation, where I have to findout working dates.

I have a field ‘Date’ ,

In excel Workday(Date,-1, Bankholys) as WD_ Date. I want  to replicate WD_Date in qliksense 

Example - 1.Date - 07/01/22 , Friday then WD_Date - 06/01/22

2. Date - 10/01/22 , Monday then WD_Date - 07/01/22 

kindly help me on this

Regards,

Prasad.

 

Labels (1)
1 Solution

Accepted Solutions
maxgro
MVP
MVP

 

try with

FirstWorkDate(Date-1,1)

 

View solution in original post

5 Replies
maxgro
MVP
MVP

try with lastworkdate function 

The lastworkdate function returns the earliest ending date to achieve no_of_workdays (Monday-Friday) if starting at start_date taking into account any optionally listed holiday. start_date and holiday should be valid dates or timestamps. 

https://help.qlik.com/en-US/qlikview/May2021/Subsystems/Client/Content/QV_QlikView/Scripting/DateAnd...

 

Prasad1318
Contributor II
Contributor II
Author

Thanks Maxgro for the reply,

How can we give -1 i mean negative no. Of working date in the last work date function, actually, I have given function as follows 

LastWorkdate(Date,1,$(vBankhlyd))-1 

now if Date - 10/01/2022 Monday then WD_Date - 09/01/2022 Sunday is coming instead 07/01/2022 - Friday 

It is working fine for Tuesday, Wednesday, Friday 

is it right what I have written?

Thank you 

Regards,

Prasad

 

Prasad1318
Contributor II
Contributor II
Author

Sry It is working for Tuesday Wednesday Thursday Friday except Monday

maxgro
MVP
MVP

 

try with

FirstWorkDate(Date-1,1)

 

Prasad1318
Contributor II
Contributor II
Author

Thank you Maxgro for the solution, it is working