Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello all,
I was wondering if you could assist me in a potential transposing query.
I have a table as below:
Product | Sales |
---|---|
Shoes | 3 |
Jackets | 2 |
Shorts | 1 |
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...
Hi,
one solution could be:
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
Hi,
one solution could be:
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
Thanks for the quick reply. Works very well with the simplest addition to my script.
Thank you for your assistance.
Matt
you're welcome.
regards
Marco