Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Highlighted
bismart
Contributor

Explode Summary table to detail table

Hi

I have a summary table as follows;

Product CategoryASPUnitsRows
Category A120.0013893
Category B26.677034
Category C191.257842

I want to explode the table to a new table with number of rows for each Product Category as defined in the Rows column.

Required:

Product CategoryCodeASPUnits
Category A1120.001389
Category A2120.001389
Category A3120.001389
Category B426.67703
Category B526.67703
Category B626.67703
Category B726.67703
Category C8191.25784
Category C9191.25784

Category A has 3 rows.. Category B as 4 etc.

In the new detailed table I also want to create a new field (Code) which can be any sequential number series.

Anybody any ideas how to achieve this?

Thanks

Tags (3)
1 Solution

Accepted Solutions
MVP
MVP

Re: Explode Summary table to detail table

Maybe like this:

LOAD *, iterno() as Code INLINE [

Product Category,    ASP,    Units,    Rows

Category A,    120.00,    1389,    3

Category B,    26.67,    703,    4

Category C,    191.25,    784,    2

] while iterno() <= Rows;

View solution in original post

2 Replies
MVP
MVP

Re: Explode Summary table to detail table

Maybe like this:

LOAD *, iterno() as Code INLINE [

Product Category,    ASP,    Units,    Rows

Category A,    120.00,    1389,    3

Category B,    26.67,    703,    4

Category C,    191.25,    784,    2

] while iterno() <= Rows;

View solution in original post

bismart
Contributor

Re: Explode Summary table to detail table

Thanks for that

Works a treat