Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Common Calendar

Hello,

I've read up on several threads on creating a "Common Calendar" and have yet to find one that explains how to do it in a concise and simple manner for someone like me, who knows absolutely nothing about Qlikview or SQL or scripting.

What I have learned so far is from copying other peoples' work and importing a couple of Excel tables into a .qvd file, but the script I've got to generate a common calendar always errors out with this message, which I don't understand at all:

To anyone with a little spare time, can you please explain to me what this error means and exactly how to fix it?  I've attached my rudimentary common calendar file as well.

Thank you for your help.

6 Replies
alexandros17
Partner - Champion III
Partner - Champion III

In your script in the tab test data you drop testdata table, then you try to load it again ... but obviously don't find it.

To fix, move drop of table testdata to the end of the script

giakoum
Partner - Master II
Partner - Master II

The script you are using defines the sub for creating a calendar. You need to call the sub to actually create it. let's suppose that you want to create a calendar based on your field [Report Date]. Then you need to call the sub as follows :

CALL CalendarFromField('Report Date', 'ReportDateCalendar', '_');

where ReportDateCalendar will be the table name of your new calendar table and _ the fields prefix (can be omiited). If you need an additional calendar on some other date field, then you need to call the sub again, changing parameters. For example :

CALL CalendarFromField('Bank Open Date', 'BankOpenDateCalendar', '_');

Try it and observer the results.

Not applicable
Author

Thanks for both of your quick replies!  I've got a fire to put out, but will try out both of your suggestions ASAP.

Much appreciated,

Egan

Not applicable
Author

Hi Alessandro,

When you suggested to move the line, 'DROP Table TestData;', it already is the last statement in that tab.  Do you mean to demote that tab to the very bottom?  If so, is there a way to keep that tab untouched but move that line somewhere else?

Thank you


Not applicable
Author

Hi Ioannis,

Where should the script commands that you are suggesting be created?  In an existing tab or a new one?  I don't understand the reasoning or logic behind the Qlikview tab structure so sorry if my question seems so simple.

Thank you

giakoum
Partner - Master II
Partner - Master II

They should be created anywhere, but after the lines the sub is defined.