Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I keep getting the following error when QlikView runs the Master Calendar script :-
I've checked the variables exist. I've checked "DateNumber,", "TempDate," and "DateRowID" are not referenced anywhere else.
Any idea's on what area's I can check?
Script line error:
TempCalendar:
LOAD
39630 + rowno() - 1 AS DateNumber,
date (39630 + rowno() - 1) AS TempDate,
rowno() as DateRowID
AUTOGENERATE
- 39630 + 1
Cheers,
Laura
Your problem is that varMaxDate is empty.
It probably has something to do with the where statement in your Dates_TMP.
Perhaps if you change the Where clause to :
where num(%DateKey) >2
ORDER BY %DateKey asc;
the number 2 comes from the fact that dates in QlikView is the number of days since 31.12.1899, so 1.1.1900 will be date number 2.
Thank-you but it has been suggested and it did not fix the issue ☹
Laura Castagna
Business Systems and Process Analyst, NSW Business Chamber
140 Arthur Street North Sydney NSW 2060
Tel: 02 9458 7804 | Mob: 0429 486 934 | Web: www.nswbusinesschamber.com.au<http://www.nswbusinesschamber.com.au>
Twitter<http://www.twitter.com/nswbc> | Facebook<https://www.facebook.com/NSWBusinessChamber> | LinkedIn<http://www.linkedin.com/company/388425?trk=saber_s000001e_1000> | YouTube<http://www.youtube.com/nswbctv>
<http://www.nswbusinesschamber.com.au/>
Proud supporter of:
<http://acci.headsup.org.au/>
your varMaxDate is null
check if the following populate the value properly into the varable
Let varMaxDate = Num(Peek('%DateKey',0-1,'Dates_TMP'));
hth
Sasi
Change from:
Dates_TMP:
Load
if(IsNull(%DateKey),makedate(1900,1,1),%DateKey) as %DateKey
RESIDENT Facts
where if(IsNull(%DateKey),makedate(1900,1,1),%DateKey) <>makedate(1900,1,1)
ORDER BY %DateKey;
to:
Dates_TMP:
Load
max(%DateKey) as maxDateTemp
RESIDENT Facts;
and
Let varMinDate = Num(Peek('%DateKey',0,'Dates_TMP'));
Let varMinDate = Num(MakeDate(2008,7,1));
Let varMaxDate = Num(Peek('%DateKey',0-1,'Dates_TMP'));
To:
Let varMinDate = Num(MakeDate(2008,7,1));
Let varMaxDate = Num(Peek(maxDateTemp,0,'Dates_TMP'));
Hi,
I think your variable storing END DATE is not in num format.
Please convert the enddate variable into num and try.
Where should I place this? At the very start?
Laura Castagna
Business Systems and Process Analyst, NSW Business Chamber
140 Arthur Street North Sydney NSW 2060
Tel: 02 9458 7804 | Mob: 0429 486 934 | Web: www.nswbusinesschamber.com.au<http://www.nswbusinesschamber.com.au>
Twitter<http://www.twitter.com/nswbc> | Facebook<https://www.facebook.com/NSWBusinessChamber> | LinkedIn<http://www.linkedin.com/company/388425?trk=saber_s000001e_1000> | YouTube<http://www.youtube.com/nswbctv>
<http://www.nswbusinesschamber.com.au/>
Proud supporter of:
<http://acci.headsup.org.au/>
How do I do this please?
Laura Castagna
Business Systems and Process Analyst, NSW Business Chamber
140 Arthur Street North Sydney NSW 2060
Tel: 02 9458 7804 | Mob: 0429 486 934 | Web: www.nswbusinesschamber.com.au<http://www.nswbusinesschamber.com.au>
Twitter<http://www.twitter.com/nswbc> | Facebook<https://www.facebook.com/NSWBusinessChamber> | LinkedIn<http://www.linkedin.com/company/388425?trk=saber_s000001e_1000> | YouTube<http://www.youtube.com/nswbctv>
<http://www.nswbusinesschamber.com.au/>
Proud supporter of:
<http://acci.headsup.org.au/>
Thank you
Sent from my iPhone