Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
holymosfet
Contributor III
Contributor III

Merge Rows with shared ID and only one distinct value per Column

Hi all,

I feel like this must be a beginner question but I couldn't find out how to solve it. I have the left table and want to transform it to the right table:

holymosfet_0-1605736456972.png

 Is there any easy way to do it?

Thank you!

Labels (4)
2 Solutions

Accepted Solutions
MayilVahanan

HI @holymosfet 

If you have one values for A,B,C,D for ID. then try like below

Load ID, Min(A), Min(B), Min(C), Min(D) from yoursource group by ID;

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.

View solution in original post

holymosfet
Contributor III
Contributor III
Author

Hi Mayil,

thanks a lot it worked! I just had to add the AS statements:

Load ID, Min(A) AS A, Min(B) AS B, Min(C) AS C, Min(D) AS D from yoursource group by ID;

View solution in original post

4 Replies
Anonymous
Not applicable

Hello Holy.

 

This can be achieved with left Join in load script..Am unable to write it for you as am on mobile..My bad..

MayilVahanan

HI @holymosfet 

If you have one values for A,B,C,D for ID. then try like below

Load ID, Min(A), Min(B), Min(C), Min(D) from yoursource group by ID;

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Millerien
Contributor
Contributor

Thanks for the update and quick reply. I'll be sure to keep an eye on this thread.

holymosfet
Contributor III
Contributor III
Author

Hi Mayil,

thanks a lot it worked! I just had to add the AS statements:

Load ID, Min(A) AS A, Min(B) AS B, Min(C) AS C, Min(D) AS D from yoursource group by ID;