

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Display the row values as comma separated column values.
Hi Experts,
I have a table created in Qlik sense and it has 10 columns and there is a requirement to add another column which has multiple values.
Based on the ID which is one of the column , I have to add another column and the values should be comma separated. Is there a way I can solve this by the formula in expression?
Current
ID | TID |
---|---|
1 | 123 |
1 | 456 |
2 | 963 |
2 | 258 |
2 | 741 |
3 | 789 |
3 | 654 |
3 | 123 |
3 | 951 |
Expected
ID | TID |
---|---|
1 | 123,456 |
2 | 963,258,741 |
3 | 789,654,123,951 |
I used the below query in dimension expression
=concat(TID,',')
But its giving me an error saying invalid dimension.
Thanks,
Ishan
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Now it's clear. Try:
Straight table:
Dim: ID
Exp: Concat( Distinct TID, ',')
If you are using as calculated dimension, try like:
=Aggr(Concat(Distinct TID, ','), ID)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Possibly there is a way. And that could be suggested, if you could explain your requirement in bit more details; may be with an example with sample data.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What if you try using like: = ID & ' , ' & TID

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Ishan,
Use the below expression as calculated dimension.
AGGR(Concat(DISTINCT TID,','),ID)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Now it's clear. Try:
Straight table:
Dim: ID
Exp: Concat( Distinct TID, ',')
If you are using as calculated dimension, try like:
=Aggr(Concat(Distinct TID, ','), ID)


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you very Much. This is what I was looking for.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In your expression you have grouped by ID. If we have 2 values to group what will be the expression?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Check aggr() on help. It would be something like: Aggr( Concat(....), Dim1, Dim2)
