Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
lorenzo_gibbo
Contributor III
Contributor III

repeat record

Hi all, I should solve this problem.

Given a data set as follows:

ARTICLE

MODEL

PRICE

Q.TY

XX

RED

10,00

3

ZZ

GREEN

12,00

2

YY

YELLOW

11,00

1

I want to get a table showing the association Article / model / price many times as the quantity, ie:

ARTICLE

MODEL

PRICE

XX

RED

10,00

XX

RED

10,00

XX

RED

10,00

ZZ

GREEN

12,00

ZZ

GREEN

12,00

YY

YELLOW

11,00

Can anyone helpme?

Thanks all.

1 Solution

Accepted Solutions
lironbaram
Partner - Master III
Partner - Master III

hei

try this script:

TestTemp:

LOAD * INLINE [
ARTICLE, MODEL, PRICE, QTY
XX, RED, 10, 3
ZZ, GREEN, 12, 2
YY, YELLOW, 11, 1
]
;


Data:
load ARTICLE,
MODEL,
PRICE,
rowno() as RowNum
resident TestTemp
while IterNo()<=QTY;

drop table TestTemp;

View solution in original post

2 Replies
lironbaram
Partner - Master III
Partner - Master III

hei

try this script:

TestTemp:

LOAD * INLINE [
ARTICLE, MODEL, PRICE, QTY
XX, RED, 10, 3
ZZ, GREEN, 12, 2
YY, YELLOW, 11, 1
]
;


Data:
load ARTICLE,
MODEL,
PRICE,
rowno() as RowNum
resident TestTemp
while IterNo()<=QTY;

drop table TestTemp;

lorenzo_gibbo
Contributor III
Contributor III
Author

Thank you very much!