Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
gitguto
Contributor III
Contributor III

Repeating Values of one Field into the next

Hello folks, 

Let's get right into it,

Example, this is what I have:

Table1:

Name Last Name
Bob Marley
Bob Nelson
Peter Tosh
Kate  Kate
Kate Winslet
Kate  Perry

 

This is what I need:

Table2:

Name Last Name
Bob Bob
Bob Marley
Bob Nelson
Peter Peter
Peter Tosh
Kate Kate
Kate Winslet
Kate

Perry

 

Notice that I wont add an extra "Kate" in Table 2 because I already have the combination Kate - Kate in Table 1.

 

I appreciate any help, any workaround in set analysis or script will do. thank you

1 Reply
AshutoshBhumkar
Partner - Specialist
Partner - Specialist

 

Hello,

Try below script.

Table:
Load Name&'-'&"Last Name" as Key, Name, "Last Name" Inline [
Name,Last Name
Bob,Marley
Bob,Nelson
Peter,Tosh
Kate,Kate
Kate,Winslet
Kate,Perry
];

Concatenate

Table1:
Load Name as Name,Name as "Last Name" Resident Table where not Exists(Key, Name&'-'&Name);

Exit Script;

AshutoshBhumkar_0-1637303194395.png

Thanks,
Ashutosh