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: 
marcobombo
Contributor
Contributor

More value in one field

Hi everybody,

I have a problem with a new definition of table.

I have this table

Tmp:

LOAD * INLINE [

    Key, Value

    A, 10

    A, 11

    B, 10

    B, 11

    B, 12

];

and I want to obtain this risult:

Key Value

A   10,11

B   10,11,12

Can anyone help me?

Thanks

1 Solution

Accepted Solutions
Not applicable

try this

Tmp:

LOAD * INLINE [

    Key, Value

    A, 10

    A, 11

    B, 10

    B, 11

    B, 12

];

LOAD Key, concat(Value,',') as value_new Resident Tmp group by Key;

output like this

Keyvalue_new
A10,11
B10,11,12

see attachement

View solution in original post

4 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     Try this.

     Load Key,Concate(Value,',') as New_Value

     Resident Tmp Group by Key;

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Not applicable

try this

Tmp:

LOAD * INLINE [

    Key, Value

    A, 10

    A, 11

    B, 10

    B, 11

    B, 12

];

LOAD Key, concat(Value,',') as value_new Resident Tmp group by Key;

output like this

Keyvalue_new
A10,11
B10,11,12

see attachement

nizamsha
Specialist II
Specialist II

then u have to concat the value

load

key,value

,

concat(distinct value.'') as value1,

concat(distinct key .'') as key1

resident table;

marcobombo
Contributor
Contributor
Author

Excactly.

Thanks