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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Yash7
Contributor II
Contributor II

Concatenate two rows with overlapping data

Hi, 

How can I concatenate two rows that have overlapping data and only concatenate the unique data from both rows?

 

For example the first row is 

'QIBOTH-Q1D|QFRTF'

and second row is 

'GPCQIBOTH-Q1D|QFRTF'

I want the final result to just be 

'GPCQIBOTH-Q1D|QFRTF' as the second row already contains all the data from first row and just has 'GPC' as extra data. 

 

Labels (4)
2 Replies
Qrishna
Master
Master

Ypu dont need to concatenate forcefully, it works if you can check the presence of the index of the child value in the parent value.like below:

data:
LOAD *,
IF(INDEX(Column, PREVIOUS(Column))>0, Column) as Flag;
LOAD * INLINE [
Column
QIBOTH-Q1D|QFRTF
GPCQIBOTH-Q1D|QFRTF
];

2519356 - Concatenate-two-rows-with-overlapping-data .PNG

 

metholdakaarison
Contributor
Contributor

When working with datasets, it's common to encounter situations where two rows contain overlapping or complementary information about the same entity. In such cases, it is useful to concatenate the rows to create a single, more complete record. This involves identifying shared identifiers or fields, such as a name or ID, and merging the non-duplicate data from each row into one.

Tag: N7