Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
salto
Specialist II
Specialist II

Group records in a single line

Hello,

I have Table A, with this appearance:

TransID - Line - DimID - DimValue

1 - 1 - A - 11A

1 - 1 - B - 11B

1 - 2 - A - 12A

1 - 2 - B - 12B

2 - 1 - A - 21A

2 - 1 - B - 21B

and I need to convert it to:

TransID - Line - A - B

1 - 1 - 11A - 11B

1 - 2 - 12A - 12B

2 - 1 - 21A - 21B

How can this be achieved in Qlikview?

Thanks in advance.

1 Solution

Accepted Solutions
johnw
Champion III
Champion III

That's just how the generic load works. If you really want to get everything back in one table, you could probably left join them back together in a loop. I could swear I wrote an example, but I can't seem to find it. I also could have sworn Rob Wunderlich had an example in his cookbook, but again, I'm not finding it.

View solution in original post

3 Replies
salto
Specialist II
Specialist II
Author

Sorry,I did not know about "Generic Load" and the feature it has for flattening a table. I will try with this and keep an update here.

Thanks.

salto
Specialist II
Specialist II
Author

Well, it is me again. Sorry 😉

I am trying this:

generic load TransID, Line, DimID, DimValue resident TableName;

But QV converts it to 2 different tables, by DimID instead of only one "flattered" table. My idea is to use TransID and Line as table keys.

Does anybody know why is QV separating the table in two? Is it because the name I am using for the field is DimID instead of, for example, Dimension?

Regards,

Josetxo

johnw
Champion III
Champion III

That's just how the generic load works. If you really want to get everything back in one table, you could probably left join them back together in a loop. I could swear I wrote an example, but I can't seem to find it. I also could have sworn Rob Wunderlich had an example in his cookbook, but again, I'm not finding it.