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: 
grajmca_sgp123
Creator
Creator

Converting multiple row values into single columns

Hi All,

I have a requirement here where i need to convert multiple row values into single columns with some special characters

ID   Status

1      AB

1      CDEF

1       GHI

1       JKLMN

2       XYZ

2      UVWX

2       PR

ID Status

1   AB // CDEF// GHI // JKLMN

2   XYZ// UVWX // PR

if we use Concat function it will concatenate all the field values . But my requirement is i need '//' also between each field value.

do we have any other solutions to resolve this issue.

Thanks

Labels (1)
1 Solution

Accepted Solutions
tresB
Champion III
Champion III

Use delimeter '//' with concat(), like:

Concat( Distinct Status, '//')

View solution in original post

3 Replies
tresB
Champion III
Champion III

Use delimeter '//' with concat(), like:

Concat( Distinct Status, '//')

Anonymous
Not applicable

May be combination of Group by and Concat() like this?

Load

ID,

Concat(Status, '//')

Resident TableName

Group by ID;

maxgro
MVP
MVP



1.png



Source:

load *, rowno() as rn inline [

ID   Status

1      AB

1      CDEF

1       GHI

1       JKLMN

2       XYZ

2      UVWX

2       PR

] (delimiter is spaces) ;

Load

ID,

Concat(Status, ' // ', rn) as Status

Resident Source

Group by ID;

DROP Table Source;