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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
jarno_loubser
Partner - Creator
Partner - Creator

networkdays - variable replacement not working

I'm trying to replace the holiday part of the networkdays function with values in a variable as part of the load statement.

My variable's value is: '2002-12-31','2008-01-01'

The following works:

load

...

networkdays (peek(INCIDENT_DATE),INCIDENT_DATE, '2002-12-31','2008-01-01')

resident ....;

The following ignores my holidays:

load

...

networkdays (peek(INCIDENT_DATE),INCIDENT_DATE, $(HoliDays))

resident ....,;

Please help.

1 Solution

Accepted Solutions
jarno_loubser
Partner - Creator
Partner - Creator
Author

Like many problems this was solved by correctly spelling the variable in question. 😞

View solution in original post

3 Replies
SunilChauhan
Champion II
Champion II

i believe we can not assign multiple values into single variable,it need to declare seperately

for each holiday one variable

Sunil Chauhan
Miguel_Angel_Baeyens

Hi,

Just try instead

NetWorkDays(Peek('INCIDENT_DATE'), INCIDENT_DATE, '$(HoliDays)')

Note that both the field within Peek() and the variable HoliDays are single quoted.

Hope that helps.

Miguel Angel Baeyens

BI Consultant

Comex Grupo Ibérica

jarno_loubser
Partner - Creator
Partner - Creator
Author

Like many problems this was solved by correctly spelling the variable in question. 😞