Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
Save the Date: QlikWorld Online, June 24-25, 2020. Free global virtual event for data integration and data analytic gurus. Register Today
Highlighted
New 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
Highlighted

Re: transform table

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
Highlighted

Re: transform table

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

Highlighted

Re: transform table

Why 3 is not there in the outcome?

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Highlighted

Re: transform table

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.

Highlighted

Re: transform table

Haha, You made it

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Highlighted
New Contributor III

Re: transform table

Thanks, it works well.