Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a requirement to combine a columns data into on row as below example i.e UK and US country should come in same row for ID 3
Thanks in Advance
ID | Name | country | |
1 | aa | Sweden | |
2 | bb | Denmark | |
3 | aa | US | |
3 | aa | UK | |
4 | cc | US | |
4 | dd | UK | |
ID | Name | country | |
1 | aa | Sweden | |
2 | bb | Denmark | |
3 | aa | US, UK | |
4 | cc | US | |
4 | dd | UK | |
Use Concat() Function
T1:
Load * Inline [
ID, Name, country
1, aa, Sweden
2, bb, Denmark
3, aa, US
3, aa, UK
4, cc, US
4, dd, UK];
Load ID,Name,Concat(country,',')as Country Resident T1 Group by ID, Name;
Drop Table T1;
Refer this thread ,
https://community.qlik.com/t5/New-to-Qlik-Sense/Comma-separated-values/m-p/1558374#M130193
Regards
In my model country is coming from different table . joining them n doing concat is not a good idea.
creating concat(country) as measure gives below result
ID | Name | country |
total | Sweden,Denmark,US,UK | |
1 | aa | Sweden |
2 | bb | Denmark |
3 | aa | US |
3 | aa | UK |
4 | cc | US |
4 | dd | UK |
Hi Shubham,
I didn't get what exactly your are doing for my issue.