Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Customer & Partners, DEC. 9, 11 AM ET: Qlik Product & Strategy Roadmap Session: Data Analytics REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikview979
Specialist
Specialist

Autogenerate

Hi Experts,

what is "Autogenerate" and how it will work "Autogenerate 0" in script level?

1 Solution

Accepted Solutions
sunny_talwar

Autogenerate is used to create a table which is not coming from any database. For example if I want to create a Dummy Data table I can use it like this:

Table:

LOAD *,

  WeekStart(Date) as WeekStart;

LOAD Date(MakeDate(2009, 12, 31) + RecNo()) as Date,

  Ceil(Rand() * 100) * 10 as Sales

AutoGenerate (Today() - MakeDate(2015, 12, 31));

Here is is creating a table with date from Dec 31st 2015 till today (121 rows of data) and creating a sales field using Rand() function.

AutoGenerate 0 is used to create table with 0 rows. This is useful when you are using for loop

Table:

LOAD 0 as Dummy

AutoGenerate 0;

FOR i = 1 to 10

     Concatenate(Table)

     LOAD....

     FROM ....

NEXT

DROP Field Dummy;

So that I can concatenate, I can create a table with no data in it.

View solution in original post

2 Replies
sunny_talwar

Autogenerate is used to create a table which is not coming from any database. For example if I want to create a Dummy Data table I can use it like this:

Table:

LOAD *,

  WeekStart(Date) as WeekStart;

LOAD Date(MakeDate(2009, 12, 31) + RecNo()) as Date,

  Ceil(Rand() * 100) * 10 as Sales

AutoGenerate (Today() - MakeDate(2015, 12, 31));

Here is is creating a table with date from Dec 31st 2015 till today (121 rows of data) and creating a sales field using Rand() function.

AutoGenerate 0 is used to create table with 0 rows. This is useful when you are using for loop

Table:

LOAD 0 as Dummy

AutoGenerate 0;

FOR i = 1 to 10

     Concatenate(Table)

     LOAD....

     FROM ....

NEXT

DROP Field Dummy;

So that I can concatenate, I can create a table with no data in it.

View solution in original post

clondono
Creator III
Creator III

Hi Mahesh,

You can find "Autogenerate" explained and with samples here:


Autogenerate Your Data