
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Concat in qliksense
Hi qlikss,
I have table like this.
I'd. Letter. Name
1. A. Jhon
1. B. Kane
1. A. Taker
2. B. Rock
2 B. Punk
3. A. Myster
I want my output table like this
I'd. Final column
1. Jhon,Taker
2. Rock,Punk
3. Myster
Whenever there is A , it should concatenate all A values. If there no " A" for that particular I'd then it
Should concatenate all "B" values.
Accepted Solutions


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The exact order of operations kind of depends on where you are doing this, but here's a script suggestion.
Data:
LOAD
Id,
Letter,
Concat(Name, ',') as Name
Group By Id, Letter
;
LOAD * Inline [
Id, Letter, Name
1, A, Jhon
1, B, Kane
1, A, Taker
2, B, Rock
2, B, Punk
3, A, Myster
]
;
Inner Join (Data)
LOAD
Id,
MinString(Letter) as Letter
Resident Data
Group By Id
;
-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The exact order of operations kind of depends on where you are doing this, but here's a script suggestion.
Data:
LOAD
Id,
Letter,
Concat(Name, ',') as Name
Group By Id, Letter
;
LOAD * Inline [
Id, Letter, Name
1, A, Jhon
1, B, Kane
1, A, Taker
2, B, Rock
2, B, Punk
3, A, Myster
]
;
Inner Join (Data)
LOAD
Id,
MinString(Letter) as Letter
Resident Data
Group By Id
;
-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @stonecold111,
fully agree with @rwunderlich's solution. If you want keep value order of concatenated string same as in your output table (Rock, Punk), just a small adjustment of mentioned solution:
Data:
LOAD
Id,
Letter,
Concat(Name, ',',Sorter) as Name
Group By Id, Letter
;
LOAD
Id,
Letter,
RecNo() as Sorter,
Name
;
LOAD * Inline [
Id, Letter, Name
1, A, Jhon
1, B, Kane
1, A, Taker
2, B, Rock
2, B, Punk
3, A, Myster
]
;
Inner Join (Data)
LOAD
Id,
MinString(Letter) as Letter
Resident Data
Group By Id
;
BR
m

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You guys are awesome.
Thanks both of you
