Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

I need to link the value of a variable to a table

Good day guys,

I hope there is a simple way of doing this through QlikView.

I calculate previous day using a variable but I need to know if previous day was a public holiday. This flag sits in my Date table and thus need to link this variable date to the Date table.

Your co-operation will be highly appreciated.

Thanks,
Marius

7 Replies
Not applicable
Author

Marius,

may you share example?

regards

Darek

MayilVahanan

Hi

Try with mapping and apply map concept or networkdays  to achieve your requirement.

Hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Not applicable
Author

Hi have attached a simple example.

However the variable won't be as simple as the one in this qvw. I have a Year, Month and Day selection box whereby you can select any day you want whereby my variable will then calculate the previous day of that selection. But I need to determine if the previous day was a public holiday or a weekend and if so I need to go back to the first working day available before hand.

I have all these flags in my date table.

Thanks,
Marius

Not applicable
Author

Hi Mayil,

Thanks for your reply but can you explain to me how will I do this?

Usually I apply applymap inside the load script and being my problem that I can't link to a table I'm not sure that this will resolve my issue.

Kind Regards,
Marius

jonathandienst
Partner - Champion III
Partner - Champion III

Marius

If you are trying to determine the last working day before yesterday, you can use LastWorkDate() to determine the date. You can compare this date to yesterday's date to determine whether yesterday was a working or a non-working day.

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
jonathandienst
Partner - Champion III
Partner - Champion III

Something like:

          FirstWorkDate(Today() - 1, 1, $(vHolidayList)) <> Today()-1   

vHolidayList is a comma separated list of quotes dates, like:    '2014/05/01', 2014/05/07'

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Peter_Cammaert
Partner - Champion III
Partner - Champion III

I don't know what you're trying to accomplish, but the document in attachment does exactly what you were asking.

Trick: Only()

Best;

Peter