Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

ishanbansal1204
New Contributor II

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

IDTID
1123
1456
2963
2258
2741
3789
3654
3123
3951

Expected

IDTID
1123,456
2963,258,741
3789,654,123,951

I used the below query in dimension expression

=concat(TID,',')

But its giving me an error saying invalid dimension.

Thanks,

Ishan

Tags (1)
1 Solution

Accepted Solutions
MVP
MVP

Re: Display the row values as comma separated column values.

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)

View solution in original post

7 Replies
MVP
MVP

Re: Display the row values as comma separated column values.

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.

MVP
MVP

Re: Display the row values as comma separated column values.

What if you try using like: = ID & ' , ' & TID

qlik_ashok
New Contributor III

Re: Display the row values as comma separated column values.

Hello Ishan,

Use the below expression as calculated dimension.

AGGR(Concat(DISTINCT TID,','),ID)

MVP
MVP

Re: Display the row values as comma separated column values.

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)

View solution in original post

ishanbansal1204
New Contributor II

Re: Display the row values as comma separated column values.

Thank you very Much. This is what I was looking for.

ishanbansal1204
New Contributor II

Re: Display the row values as comma separated column values.

In your expression you have grouped by ID. If we have 2 values to group what will be the expression?

MVP
MVP

Re: Display the row values as comma separated column values.

Check aggr() on help. It would be something like: Aggr( Concat(....), Dim1, Dim2)