Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Calendar from Field Component

Hello,

I am having issues using the "Calendar from Field" component. I am getting the following error.

Script line error:

LOAD date('' + recno() - 1) as Date,

  date('' + recno() - 1) as _qvctemp.Date

AUTOGENERATE date('') - date('') + 1

If I load my date field as such "Date(Date#([Create Date],'MM/DD/YYYY hh:mm'),'MM/DD/YYYY') as Date", Then I dont get the error above, but then all the Calendar list-boxes show empty.

Any thoughts?

5 Replies
vinieme12
Champion III
Champion III

Please post the complete script

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Not applicable
Author

Its part of the Qlikview components pack "Calendar from Field", I don't know how I would open the full script .

vinieme12
Champion III
Champion III

have you tried by using other Master Calendar scripts?

https://qlikviewcookbook.com/2015/05/better-calendar-scripts/

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Anonymous
Not applicable
Author

Hi Jhancer,

Try this:

MinMaxDate:

LOAD

     Min(Date)          as MinDate,

     Max(Date)          as MaxDate

RESIDENT YourTable;

LET vMinDate = Date(Floor(Peek('MinDate',0,'MinMaxDate')));

LET vMaxDate = Date(Floor(Peek('MaxDate',0,'MinMaxDate')));

Calendar:

LOAD $(vMinDate) + recno() - 1 as Date,

          $(vMinDate) + recno() - 1 as _qvctemp.Date

AUTOGENERATE $(vMaxDate) - $(vMinDate) + 1;

Regards!!!!

Not applicable
Author

So it seems that it was an issue with the date format. I changed the date format of the raw data (it was an excel file) and then all worked fine.