Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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.
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.
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;
Brenner / John
Thanks a lot it's working..
John / Brenner
Is it possible to transfer a variable from one qvw file to another qvw file along with data after clicking the button.