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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
vanast
Contributor
Contributor

Merge two rows with one column with different values into 1 row with both values

Hi,

I have the following issue. I have a set of data with multiple rows and different columns. I made a simple example that should solve my problem.

This is the  example data that i have. If the values of ID is the same then i want to have a combined field in location separated by a value. How can i solve this in my script?

ID Location
1 New york
1 Amsterdam
2 Tokyo
3 Barcelona

 

This is the table that i want to have

ID Location
1 New york, Amsterdam
2 Tokyo
3 Barcelona

 

Thanks in advance for your help!

Labels (1)
1 Solution

Accepted Solutions
Or
MVP
MVP

This is a use case for Concat(), seemingly:

 

Load ID, Concat(Location, ',')

From YourTable

Group By ID;

View solution in original post

2 Replies
Or
MVP
MVP

This is a use case for Concat(), seemingly:

 

Load ID, Concat(Location, ',')

From YourTable

Group By ID;

vanast
Contributor
Contributor
Author

Thank you for this. It worked!