Qlik Community

QlikView Deployment

Discussion Board for collaboration related to QlikView Deployment.

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

1 Solution

Accepted Solutions
Employee
Employee

Re: Re: Re: Get error massage when i try to create master calendar

fixed it for you

21 Replies
Not applicable

Re: Get error massage when i try to create master calendar

Hi Paul

Try The below script.. Hope it will help

AutoGenerationDate:

Load

RecNo( ) as A,

if(RecNo()=1,date(MakeDate(2001,1,1)),date((Peek("AutoDate")+1))) as AutoDate,

date(if(RecNo()=1,date(MakeDate(2001,1,1)),date((Peek("AutoDate")+1))),'DD/MM/YYYY') as AutoDate_new,

year(if(RecNo()=1,date(MakeDate(2001,1,1)),date((Peek("AutoDate")+1)))) as AutoYear,

Month(if(RecNo()=1,date(MakeDate(2001,1,1)),date((Peek("AutoDate")+1)))) as NormalMonth,

MonthName(if(RecNo()=1,date(MakeDate(2001,1,1)),date((Peek("AutoDate")+1)))) as My,

if(wildmatch(month((if(RecNo()=1,date(MakeDate(2001,1,1)),date((Peek("AutoDate")+1))))),'Jan','Feb','Mar'),year((if(RecNo()=1,date(MakeDate(2001,1,1)),date((Peek("AutoDate")+1)))))-1,year((if(RecNo()=1,date(MakeDate(2001,1,1)),date((Peek("AutoDate")+1)))))) as Fin_Year,

if(month((if(RecNo()=1,date(MakeDate(2001,1,1)),date((Peek("AutoDate")+1)))))<=3,month((if(RecNo()=1,date(MakeDate(2001,1,1)),date((Peek("AutoDate")+1)))))+9,month((if(RecNo()=1,date(MakeDate(2001,1,1)),date((Peek("AutoDate")+1)))))-3) as Fin_Month

autogenerate(50000);

Left Join(AutoGenerationDate)

//Entry_DT_QTR:

LOAD * INLINE [

Fin_Month, Month_New,QTR

1, Apr,Q1

2, May,Q1

3, Jun,Q1

4, Jul,Q2

5, Aug,Q2

6, Sep,Q2

7, Oct,Q3

8, Nov,Q3

9, Dec,Q3

10, Jan,Q4

11, Feb,Q4

12, Mar,Q4

];

Not applicable

Re: Get error massage when i try to create master calendar

Hi sir

Thank you for your script very special.

The 2 table not link by date field.

i try to link by Date field.

But it cannot work.

Not applicable

Re: Get error massage when i try to create master calendar

Can you post your application

Not applicable

Re: Re: Get error massage when i try to create master calendar

see my QV doc

Not applicable

Re: Re: Re: Get error massage when i try to create master calendar

try to reload now

Not applicable

Re: Get error massage when i try to create master calendar

Hi Paul,

You are just missing a comma after "MY". Try this:

 

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
;
Hope this helps!

Not applicable

Re: Get error massage when i try to create master calendar

Hi Shy

After add the comma , the error msg go away.

Now another issue came out , it does generate a calendar table.

Why ?

Not applicable

Re: Get error massage when i try to create master calendar

Hi Paul,

Not sure if  I understand you. Can you elaborate a little?

Not applicable

Re: Get error massage when i try to create master calendar

Have you try the below one

Community Browser