Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
how autogenerate works in qlikview?
Start with the F1 help and reference manual - they are pretty good explanations.
Hi,
Autogenerate is a function that can be used with Load Statement in the script side.
This function is used to generate specified number of rows using script.
For ex: during the calendar table creation this function is used as below.
LET vDateMin = Num(Peek('Start_Date_AP', 0, 'AP_Link_Table'));
LET vDateMax = Num(Peek('End_Date_AP', -1, 'AP_Link_Table'));
LET vDateToday = Num(Today());
TempCalendar1:
LOAD
$(vDateMin) + RowNo() - 1 AS Date_Key,
Date($(vDateMin) + RowNo() - 1) AS Date
AUTOGENERATE 1
WHILE $(vDateMin)+IterNo()-1<= $(vDateMax);
Master_Calendar:
load Date_Key
,Date
,Date as EMp_date
//,Day(Date) as Day
//,Week(Date) as Week
,WeekName(Date) as WeekName
//,month(Date) as Month
,MonthName(Date) as MonthName
,MonthName(Date) as Period
,Quartername(Date) as QuarterName
,ApplyMap('Quarters_Map',num#(month(Date)))as Quarter
,year(Date) as CalendarYear
,WeekDay(Date) as WeekDay
,text(weekday(Date)) as Week_Day1
Resident TempCalendar1;
DROP Table TempCalendar1;
Let me know if u ve any more questions
Regards
Hudson
How can I start the help with F1 ? thanks..
Trying the script I have the following error:
Field not found - <<=>
TempCalendar1:
LOAD
+ RowNo() - 1 AS Date_Key, Date( + RowNo() - 1) AS Date
AUTOGENERATE 1
WHILE +IterNo()-1<=
...............
thanks for aby assistance
AutoGenerate statement takes one parameter that specify the number of rows to generate.
Ex:AutoGenerate(10) - it generates 10 row
Useful when combined with a function such as RecNo() or RowNo()
ok,I knuw, but I can't understand the error in the script
Please check if below helps you to understand the functionality of AutoGenerate
ok thanks, same useful examples