Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
jagannalla
Partner - Specialist III
Partner - Specialist III

How to auto generate on loaded data?

Hi,

- I have an excel sheet with columns ID,A,B and the number of rows is 3.  Now i'll load this excel sheet into qlikview and assign a table name for this data.

- Now i want to autogenarate this table upto 100 rows on repeating A,B field data of 3 rows only and distinct value for ID.

For Example:

// This is excel sheet data

Table1:

ID      A     B

1       a1     b1

2       a2     b2

3       a3     b3

// I want generate this table upto 100

Table1:

ID      A     B

1       a1     b1

2       a2     b2

3       a3     b3

4      a1     b1

5       a2     b2

6       a3     b3

.        .       .

.        .       .

.        .       .

.        .       .

.        .       .

100    a3    b3

1 Solution

Accepted Solutions
brenner_martina
Partner - Specialist II
Partner - Specialist II

Hi, Jagannalla,

there is a function: RowNo(), you can enter in your script something like this:

Table1:

ID      A     B

1       a1     b1

2       a2     b2

3       a3     b3

For i=1 to 32

Concatenate (Table1)

Load

     RowNo() As ID,

     A,

     B

Resident Table1;

Next i

Concatenate (Table1)

Load

     RowNo() As ID,

     A,

     B

Resident Table1 Where A='a1';

I thing now you have 100 records.

View solution in original post

4 Replies
brenner_martina
Partner - Specialist II
Partner - Specialist II

Hi, Jagannalla,

there is a function: RowNo(), you can enter in your script something like this:

Table1:

ID      A     B

1       a1     b1

2       a2     b2

3       a3     b3

For i=1 to 32

Concatenate (Table1)

Load

     RowNo() As ID,

     A,

     B

Resident Table1;

Next i

Concatenate (Table1)

Load

     RowNo() As ID,

     A,

     B

Resident Table1 Where A='a1';

I thing now you have 100 records.

johnw
Champion III
Champion III

LOAD ID+(iterno()-1)*3 as ID,A,B

INLINE [

ID,A,B

1,a1,b1

2,a2,b2

3,a3,b3

] WHILE iterno()<=33;

jagannalla
Partner - Specialist III
Partner - Specialist III
Author

Brenner / John

Thanks a lot it's working..

jagannalla
Partner - Specialist III
Partner - Specialist III
Author

John / Brenner

Is it possible to transfer a variable from one qvw file to another qvw file along with data after clicking the button.