Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
max_potass
Creator
Creator

FirstWorkDate

Hi Everyone,

I am currently struggeling with the FirstWorkDate Function.

I am Using

FirstWorkDate(last_data,5,vPublicHolidays)

where last_data is 06.05.2018.

in vPublicHolidays the 01.05.2018 is contained (and it does work in NetWorkDays just fine, I checked that).

The function returns 30.04.2018 but it should be the 27.04.2018, right? (04.05, 03.05, 02.05, 30.04. 27.04.)

Also I had lasta_data as 07.05.2018 and it returned 01.05.2018 which is a specified holiday...

When i am not using the varaible "vPublicHolidays" and only specify 1.5. with makedate it works. But as I said May has 19 Workdays according Net Workdays which uses vPublicHolidays.... (which is correct)

Does anyone know, whats happening there?

Best Regards

Max

Labels (1)
1 Solution

Accepted Solutions
max_potass
Creator
Creator
Author

Ok, I found it myself.

I have to put $(vPublicHolidays)

Can someone explain why this is necessary?

View solution in original post

3 Replies
tresB
Champion III
Champion III

I am getting 27.04.2018. Could it be a formatting issue? Please check and ensure all dates you are using are in same format.

max_potass
Creator
Creator
Author

Ok, I found it myself.

I have to put $(vPublicHolidays)

Can someone explain why this is necessary?

tresB
Champion III
Champion III

That is probably because, your variable has got a definition and not the date values directly entered, and if that is true, it would require to be expanded (using dollar sign) to get the value in it.