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: 
aishan07
Contributor II
Contributor II

Match Values of two Columns column wise in script editor, and add new column

Hello Guys,

I have a table like below:

Load * Inline [
Full_Code, Half_Code
Q1C-0148B-NEO, -
- ,A1B-048-1B
A1B-045-1Z-DOM,A1B-045
A1B-048-1B-DOM, -
Z1C-14-LMI-BIZ,Z1C-14-LMI-BIZ
- , Q1C-0148B
Z1C-14-LMI-BIZ, -
];

The output of this table is:

aishanmunshi_0-1604926031811.png

What I need is, to add a new column, which matches the first column and second column, and adds a third column like below:

Full_CodeHalf_CodeNew Column
Q1C-0148B-NEO-Q1C-0148B
-A1B-048-1B-
A1B-045-1Z-DOMA1B-045A1B-045
A1B-048-1B-DOM-A1B-048-1B
Z1C-14-LMI-BIZZ1C-14-LMI-BIZZ1C-14-LMI-BIZ
-Q1C-0148B-
Z1C-14-LMI-BIZ-Z1C-14-LMI-BIZ

The new column matches the first column with the second column, when it finds a match for the first column from the second column, it shows the second column's value in the third column. The point is to show the first columns relevant value of the second column in the third column.

The new column we need to add is should be coded in the script editor.

I highly appreciate your help in advance.

Labels (5)
2 Replies
chrismarlow
Specialist II
Specialist II

Hi,

I think you could try following how this thread does this;

https://community.qlik.com/t5/New-to-QlikView/Joining-2-tables-based-on-substring-values-of-a-field/...

Cheers,

Chris.

aishan07
Contributor II
Contributor II
Author

It is easy to use these functions when the relevant data is in the same row, but I am facing a problem as I don't have to look up values row-wise, but search the whole second column to come up with the third column.