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

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
Master II
Master II

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

View solution in original post

4 Replies
vgutkovsky
Master II
Master II

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
Author

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

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

PrajS
Contributor III
Contributor III

Yes you can do it, provided you add the column as measure and not dimension