Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
jeckstein
Partner - Creator
Partner - Creator

Expanding table based on row value

Hi all and thanks in advance.

I was to take the following table. Each combination of date and ID should have the number of rows as in the count table.

DateIDCount
1/1/2018ABC3
1/2/2018ABC2
1/3/2018ABC2
1/1/2018DEF4
1/2/2018DEF2
1/3/2018DEF1

This following table is my desired result. The combination of Date=1/1/2018 and ID=ABD has 4 rows because the count for this combination is 4 in the table above.

DateIDCount
1/1/2018ABC1
1/1/2018ABC1
1/1/2018ABC1
1/2/2018ABC1
1/2/2018ABC1
1/3/2018ABC1
1/3/2018ABC1
1/1/2018DEF1
1/1/2018DEF1
1/1/2018DEF1
1/1/2018DEF1
1/2/2018DEF1
1/2/2018DEF1
1/3/2018DEF1

Thanks again!!!

1 Reply
MarcoWedel

Hi,

one solution might be:

QlikCommunity_Thread_289932_Pic1.JPG

table1:

LOAD RowNo() as RowNo,

    Date,

    ID,

    1 as Count

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

While IterNo()<=Count;

hope this helps

regards

Marco