Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

modifying QVD

Hello All,

I have a question and this might be really simple, but here goes anyway:

I have a table which is like:

ID     CO

01     A

02     A

03     A

01     B

04     B

03     C

04     C

So I want to create a QVD which will show

OriginalID     OtherID

     01               02

     01               03

     01               04

     02               01

     02               03

     03               01

     03               02

     03               04

     04               01

     04               03

So if the ID has common CO, they should represent each other in OriginalID fields.

Any ideas anyone?

Thanks

1 Solution

Accepted Solutions
Alejandro_Hernández
Former Employee
Former Employee

off the top of my head:

temp1:

Load * Inline [

ID,     CO

01,     A

02,     A

03,     A

01,     B

04,     B

03,     C

04,     C

];

join Load ID as ID2, CO resident temp1;

temp2:

noconcatenate load ID as OriginalID, ID2 as OtherID resident temp1 where ID<>ID2;

store temp2 into temp2.qvd;

drop tables temp1,temp2;

View solution in original post

2 Replies
Alejandro_Hernández
Former Employee
Former Employee

off the top of my head:

temp1:

Load * Inline [

ID,     CO

01,     A

02,     A

03,     A

01,     B

04,     B

03,     C

04,     C

];

join Load ID as ID2, CO resident temp1;

temp2:

noconcatenate load ID as OriginalID, ID2 as OtherID resident temp1 where ID<>ID2;

store temp2 into temp2.qvd;

drop tables temp1,temp2;

Not applicable
Author

Thanks Mr. Alejandro. I appreciate your feedback.