Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content
Announcements
March 26 at 10am ET: See how Qlik drives growth and value in ISV segment - REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
MCerro
Contributor
Contributor

Problem n to n with n= Name 1, Name 2, Name 3, ....

I have a list of tasks and the name of the people that need to do this.  The problem is that the name of the people is together in the same place, separated for comas. So I need to create a visualisation on Qlik with a list of this person (individual name) and it visualization show me a list of her/his task. I know that is a typical problem of n to n, but I don't know how to resolve it with the comas in Qlik.

MCerro_0-1675248985737.png

 

Labels (2)
2 Replies
sidhiq91
Specialist II
Specialist II

@MCerro  Could you please try the below code:

NoConcatenate
Temp:
Load Task,
SubField(Name,',',1) as Name1,
SubField(Name,',',2) as Name2,
SubField(Name,',',3) as Name3

Inline [
Task|Name
Task1| James, Richard, Joseph
Task2| James, Richard, Maria


](delimiter is '|');

Exit Script;

If this resolves the issue, please like and accept as a solution.

Renatusfreitas
Partner - Contributor III
Partner - Contributor III

@MCerro Veja se essa solução lhe atende, no passado precisei usar e encontrei uma publicação do @mario_sergio_ti que me ajudou.

Fiz um Inline para trazer os seus dados como estão.

Renatusfreitas_0-1675251426479.png

Agora usando o While, conseguirá capturar os nomes pelos separadores ','

Renatusfreitas_1-1675251535681.png

Utilizando o SubField(Trim("Name"), ', ', IterNo(),  desta forma terá uma tabela com a tarefa e nome separados

Renatusfreitas_2-1675251681867.png

Resultado da carga, acho que irá lhe atender! Se isso resolver o problema, curta e aceite como solução. abraço!!!

Renato Freitas

Se está solução ajudou, aceite-a como uma solução.

https://br.linkedin.com/in/renatusfreitas

https://cubotimize.com/