Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
it was showing a not found ? can you help
Please post your TempCalendar script.
Can be a missing comma or other...
Hi @Dolly123 !
As @micheledenardi wrote, it's probably some missing formatting sign in the script.
Unfortunately, the error message covers the relevant part of the script, so, please, post that section here.
see check this
Probably there is something wrong with vMinDate or vMaxDate variables.
I would suggest to use below solution, is more elegant and you don't need to create other temporary tables:
MasterCalendar:
Load
TempDate AS OrderDate,
week(TempDate) As Week,
Year(TempDate) As Year,
Month(TempDate) As Month,
Day(TempDate) As Day,
'Q' & ceil(month(TempDate) / 3) AS Quarter,
Week(weekstart(TempDate)) & '-' & WeekYear(TempDate) as WeekYear,
WeekDay(TempDate) as WeekDay
;
//=== Generate a temp table of dates ===
LOAD
date(mindate + IterNo()) AS TempDate
,maxdate // Used in InYearToDate() above, but not kept
WHILE mindate + IterNo() <= maxdate;
//=== Get min/max dates from Field ===/
LOAD
min(FieldValue('OrderDate', recno()))-1 as mindate,
max(FieldValue('OrderDate', recno())) as maxdate
AUTOGENERATE FieldValueCount('OrderDate');
This solution comes from Rob Wunderlich, one of the most important qlik expert.
If you have some minutes i would suggest to read the full articles:
How to add fiscal year ?in this code
how to write yeartodate ?