Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
Date | ID | Count |
---|---|---|
1/1/2018 | ABC | 3 |
1/2/2018 | ABC | 2 |
1/3/2018 | ABC | 2 |
1/1/2018 | DEF | 4 |
1/2/2018 | DEF | 2 |
1/3/2018 | DEF | 1 |
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.
Date | ID | Count |
---|---|---|
1/1/2018 | ABC | 1 |
1/1/2018 | ABC | 1 |
1/1/2018 | ABC | 1 |
1/2/2018 | ABC | 1 |
1/2/2018 | ABC | 1 |
1/3/2018 | ABC | 1 |
1/3/2018 | ABC | 1 |
1/1/2018 | DEF | 1 |
1/1/2018 | DEF | 1 |
1/1/2018 | DEF | 1 |
1/1/2018 | DEF | 1 |
1/2/2018 | DEF | 1 |
1/2/2018 | DEF | 1 |
1/3/2018 | DEF | 1 |
Thanks again!!!
Hi,
one solution might be:
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