Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikviewalex
Contributor III
Contributor III

transform table

Hello,

I would like to change my table.

My source table looks like this.

Directory;

LOAD No,

     number,

     price

FROM

Table1;

Nonumberprice
122,5
232,4

I want to reshape the table using the "Number" field. The column specifies the number of new rows.

The new table should then look like this.

Noprice
12,5
12,5
22,4
22,4
22,4

Is this possible?

Thanks

Alex

1 Solution

Accepted Solutions
sunny_talwar

Try this

Directory;

LOAD No,

    number,

    price

FROM Table1

While IterNo() <= number;

or this

Directory;

LOAD No,

    price

FROM Table1

While IterNo() <= number;

View solution in original post

5 Replies
sunny_talwar

Try this

Directory;

LOAD No,

    number,

    price

FROM Table1

While IterNo() <= number;

or this

Directory;

LOAD No,

    price

FROM Table1

While IterNo() <= number;

Anil_Babu_Samineni

Why 3 is not there in the outcome?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
sunny_talwar

I think qlikviewalex‌ wants to repeat the rows based on the value in the number field. So, No = 2 has number = 3... so it repeats 3 times.

Anil_Babu_Samineni

Haha, You made it

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
qlikviewalex
Contributor III
Contributor III
Author

Thanks, it works well.