Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Table transformation

Hi,

I have a table like this:

T1:

LOAD * Inline [

ID, ITEM

1, A

1, B

1, C

2, A

2, F

];

Is there an effective mechanism for the transformation this table into:

------------------------------

ID, ITEMS

1, "A,B,C"

2, "A,F"

-----------------------------

?

Thanks in advance,

Oleg

1 Solution

Accepted Solutions
giakoum
Partner - Master II
Partner - Master II

data:

LOAD * Inline [

ID, ITEM

1, A

1, B

1, C

2, A

2, F

];

test:

LOAD

  Concat(ITEM, ',') as ITEMS

Resident data

Group By

  ID

;

View solution in original post

5 Replies
giakoum
Partner - Master II
Partner - Master II

data:

LOAD * Inline [

ID, ITEM

1, A

1, B

1, C

2, A

2, F

];

test:

LOAD

  Concat(ITEM, ',') as ITEMS

Resident data

Group By

  ID

;

morganaaron
Specialist
Specialist

Load
ID,
Concat(ITEM, ',') as ITEMS
Resident TableName
Group by ID;

Likewise, you could just do it in the front end, have a straight table with ID as the dimension and Concat(ITEM, ',') as the expression.

Not applicable
Author

That's Great!

Thank you very much!

Anonymous
Not applicable
Author

Hi,

ioannis giakoumakis

forgot to add the ID dimension.

So it will be:

data:
LOAD * Inline
[
ID, ITEM
1, A
1, B
1, C
2, A
2, F
]
;

test:
LOAD
   Concat(ITEM, ',') as ITEMS,
   ID
Resident data
Group By   ID
;
DROP TABLE data; // only if you do not want to keep the first table
giakoum
Partner - Master II
Partner - Master II

Thank you for noticing