Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Dolly123
Creator II
Creator II

ques

Qlikhub_0-1646291939232.png

it was showing a not found ? can you help 

 

Labels (1)
6 Replies
micheledenardi
Specialist II
Specialist II

Please post your TempCalendar script.

 

Can be a missing comma or other... 

Michele De Nardi
If a post helps to resolve your issue, please accept it as a Solution.
Daniele_Purrone
Support
Support

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.

Daniele - Principal Technical Support Engineer & SaaS Support Coordinator at Qlik
If a post helps to resolve your issue, please accept it as a Solution.
Dolly123
Creator II
Creator II
Author

Qlikhub_0-1646294560952.png

 

Qlikhub_1-1646294577729.png

 

see check this 

 

micheledenardi
Specialist II
Specialist II

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:

BETTER CALENDAR SCRIPTS 

Michele De Nardi
If a post helps to resolve your issue, please accept it as a Solution.
Dolly123
Creator II
Creator II
Author

How to add fiscal year ?in this code

Dolly123
Creator II
Creator II
Author

how to write yeartodate ?