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.

Not applicable

concatenate multiple rows into one

hi

My problem is that I need to concatenate multiple rows into one row

This is my original table

Job Name resource name% Complete Duration
Levantamiento de informacionAngelica Leon100%24 horas
Levantamiento de informacionJorge Morua100%24 horas
Entrega de InformacionAngelica Leon75%120 horas
Diseño FuncionalAngelica Leon100%48 horas
Diseño TecnicoJorge Morua100%4 horas
Desarrollo/ProgramacionJorge Morua95%32 horas
ConfiguracionesJorge Morua80%56 horas
Pruebas UnitariasJorge Morua0%8 horas
AjustesJorge Morua0%8 horas
Pruebas IntegralesAngelica Leon0%3 horas
Pruebas IntegralesJorge Morua0%3 horas
Pruebas IntegralesAide pineda100%4 horas
Pruebas de UsuarioAide pineda0%8 horas
Ajustes PruebasJorge Morua0%8 horas
DocumentacionJorge Morua0%8 horas
FormacionJorge Morua0%2 horas
Salida a ProduccionJorge Morua0%1 hora
Soporte de GarantiaJorge Morua45%40 horas
LiberacionJorge Morua0%1 hora
LiberacionAngelica Leon100%2 hora

I have to show the values of the "Resource Name" column in a single row in a pivot table, for this,  is required that the value of the "Resource Name" column must concatenate each value to be repeated in the column "task Name ", for example:

Job Name resource name
Levantamiento de informacionAngelica Leon,Jorge Morua
Pruebas IntegralesAngelica Leon,Jorge Morua,Aide pineda
Levantamiento de informacionAngelica Leon
Diseño TecnicoJorge Morua

could you tell me if there is any function to do this or how I could fix it?, thanks in advance!!!

1 Solution

Accepted Solutions
vgutkovsky
Not applicable

Re: concatenate multiple rows into one

Hi, Jorge. Use function concat(). Which takes 3 parameters. In your case, you would write something like this: concat(distinct [resource name],',',[resource name])

The above assumes you want to order the concatenation alphabetically. If you need to use a different order, change the 3rd parameter.

Cheers,

Vlad

3 Replies
vgutkovsky
Not applicable

Re: concatenate multiple rows into one

Hi, Jorge. Use function concat(). Which takes 3 parameters. In your case, you would write something like this: concat(distinct [resource name],',',[resource name])

The above assumes you want to order the concatenation alphabetically. If you need to use a different order, change the 3rd parameter.

Cheers,

Vlad

Not applicable

Re: Re: concatenate multiple rows into one

Thanks Vlad, it works.

I use this function as an expression in the pivot table: concat([resource name],', ', [Job Name])


06-11-2014 04-25-35 p-m-.jpg

but I needed the new field as a dimencion so I use this code

load Nombre_Tarea,

  Concat(Nombre_Recurso,', ',Nombre_Tarea) as Union

Resident Pruebas

group by Nombre_Tarea;

and it worked well, thanks for your help !!!!


kbhasinptc
Not applicable

Re: concatenate multiple rows into one

Can we use this function for a normal table not pivot table