Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

marcobombo
New 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

Re: More value in one field

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

4 Replies

Re: More value in one field

Hi,

     Try this.

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

     Resident Tmp Group by Key;

Regards,

Kaushik Solanki

Not applicable

Re: More value in one field

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
Valued Contributor II

Re: More value in one field

then u have to concat the value

load

key,value

,

concat(distinct value.'') as value1,

concat(distinct key .'') as key1

resident table;

marcobombo
New Contributor

Re: More value in one field

Excactly.

Thanks