Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Our next Qlik Insider session will cover new key capabilities. Join us August 11th REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
matthewdavies
Contributor III
Contributor III

Transpose based on data - Script

Hello all,

I was wondering if you could assist me in a potential transposing query.

I have a table as below:

ProductSales

Shoes

3
Jackets2
Shorts1

the aim is to transpose and repeat the data within the table to show the product multiple times (as below). This will require the data to be read and an rows created on a variable that will change frequently.:

Product
Shoes
Shoes
Shoes
Jackets
Jackets
Shorts

I was hoping to achieve this with a scenario similar to:

for i = 1 to ... but so far i have been able to get the desired results.

The rational for doing this is to later concatenate another field of information i receive outside of my control.

Does anyone have any suggestions on how this can be done?

Thanks in advance...

1 Solution

Accepted Solutions
MarcoWedel

Hi,

one solution could be:

QlikCommunity_Thread_235068_Pic1.JPG

LOAD RowNo() as RowNo, *

FROM [https://community.qlik.com/thread/235068] (html, codepage is 1252, embedded labels, table is @1)

While IterNo()<=Sales;

hope this helps

regards

Marco

View solution in original post

3 Replies
MarcoWedel

Hi,

one solution could be:

QlikCommunity_Thread_235068_Pic1.JPG

LOAD RowNo() as RowNo, *

FROM [https://community.qlik.com/thread/235068] (html, codepage is 1252, embedded labels, table is @1)

While IterNo()<=Sales;

hope this helps

regards

Marco

View solution in original post

matthewdavies
Contributor III
Contributor III
Author

Thanks for the quick reply. Works very well with the simplest addition to my script.

Thank you for your assistance.

Matt

MarcoWedel

you're welcome.

regards

Marco