Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Get error massage when i try to create master calendar

Hi All

I get following error msg :-

Script line error:

TempCalendar:

LOAD

  + rowno() - 1 AS Num,

  date( + rowno() - 1) AS TempDate,

  date( + rowno() - 1) AS D,

  year( + rowno() - 1) AS Y,

  month( + rowno() - 1) AS M,

  date(monthstart( + rowno() - 1), 'MMM-YYYY') AS MY

AUTOGENERATE  -  + 1

Can some one share with me where i go wrong ?

Paul

21 Replies
Not applicable
Author

Hi Sir

After no error , it should generate 1 table for master calendar . but table does appear. only 1 table appear.

see the enclsoed QV doc.

Not applicable
Author

Hi Nir

what do you mean have i try below one ?

jonathandienst
Partner - Champion III
Partner - Champion III

Paul

It looks like you have a variable that is undefined. For example, the first line

   + Rowno() - 1 as Num

is probably something like (

   $(vStart) + Rowno() - 1 as Num

and vStart is undefined. I dont know the actual variable name in your script (I cant open the qvw you uploaded), so replace vStart with the correct variable name.

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Hi Sir

I add the 2 var name you mean i missing . i also put in some value , but each time i enter , it get missing.

Alejandro_Hernández
Former Employee
Former Employee

fixed it for you

jonathandienst
Partner - Champion III
Partner - Champion III

Paul

Not sure why you need two steps to get the min and max dates. This means you have two tables containing MinDate and MaxDate as fields.Perhaps this is confusing the Peek, because I see that varMinDate and varMaxDate are both blank.

tmp:

LOAD

  min(Date) AS MinDate,

  max(Date) AS MaxDate

RESIDENT ABSEN;

LET varMinDate = Num(Peek('MinDate'));

LET varMaxDate = Num(Peek('MaxDate'));

LET vToday = num(today());

DROP TABLE tmp;

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Hi Alej,

Now when i add below script to get the field for calendar , i get error msg.

MasterCalendar:

LOAD TempDate AS date,

  Dual(Right(Year(TempDate), 2), YearStart(TempDate)) as year_

RESIDENT TempCalendar

ORDER BY TempDate ASC;

DROP TABLE TempCalendar;

any idea why ?

Table not found

MasterCalendar:

LOAD TempDate AS date,

  Dual(Right(Year(TempDate), 2), YearStart(TempDate)) as year_

RESIDENT TempCalendar

ORDER BY TempDate ASC

Not applicable
Author

Hi Jona

you are very right , my mistake . as i use my old script which . because last time some one give the script to me. now no more error , because some one have fix the problem. now next problem.

Not applicable
Author

Hi All

Thank you very one here for your help.

I manage to solve the problem.

Paul

Not applicable
Author

Hi Paul

Sorry.... wrong entry