Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Pa1K
Contributor
Contributor

Generate count is out of range

Hi all...

The below is the master cal Script:

QuartersMap:
MAPPING LOAD
rowno() as FYMonth,
'Q' & Ceil (rowno()/3) as Quarter
AUTOGENERATE (12);

Temp:
Load
date(yearstart(min(DateWID))) as minDate,
max(DateWID) as maxDate

Resident CombiKey;


Let vMin = Num(Peek('minDate', 0, 'Temp'));
Let vMax = Num(Peek('maxDate', 0, 'Temp'));
DROP Table Temp;

 

TempCal:
Load
Date(Date('$(vMin)')-1 + recno()) as Temp_Date
AUTOGENERATE (Date('$(vMax)')-Date('$(vMin)'))+1;

 

MasterCalendar:
LOAD Temp_Date as [DateWID],
Year(Temp_Date) as [Year],
day(Temp_Date)as day,
'Week' &week(Temp_Date) as Week,
MonthName(Temp_Date) as [Month Year],
ApplyMap('QuartersMap', Dual(Month( Date(Date#("Temp_Date",'MM/DD/YYYY'))),if(Month( Date(Date#("Temp_Date",'MM/DD/YYYY')))<4,Month( Date(Date#("Temp_Date",'MM/DD/YYYY')))+9,Month( Date(Date#("Temp_Date",'MM/DD/YYYY')))-3)), Null()) as Quarter,
Month(Temp_Date) as [Month],
Year(Temp_Date)&num(Month(Temp_Date),'00') as [MonthYear] ,
Year(YearStart( Date(Date#("Temp_Date",'MM/DD/YYYY')),0,4)) as FYYear,
YearName(Temp_Date,0,4) as [Fiscal Year],
Dual(Month( Date(Date#("Temp_Date",'MM/DD/YYYY'))),if(Month( Date(Date#("Temp_Date",'MM/DD/YYYY')))<4,Month( Date(Date#("Temp_Date",'MM/DD/YYYY')))+9,Month( Date(Date#("Temp_Date",'MM/DD/YYYY')))-3))
as FYMonth



Resident TempCal;

DROP Table TempCal;

WhatsApp Image 2022-06-27 at 1.53.29 PM.jpeg

Worked well until last week...now it is showing error as above.

Please help me find out the fixes.

 

 

 

 

Labels (1)
1 Reply
MayilVahanan

HI

MayilVahanan_0-1656320640725.png

 

There is no values in the "Temp" folder.
i.e. CombiKey table doesn't have data. Check on this table and fix the issue.

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.