Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

replace new content

Dear All, I have two tables :

   

productproductcode
bulb58
radio100
printer37
computer33

 

oldproductcodenew product code
58AH67
100LK22
37CY13
44OL09
33

PE55 

I want to replace the product code with the new product code from 2nd table.

plz suggest.

1 Solution

Accepted Solutions
sunny_talwar

Try this

MappingTable:

Mapping

LOAD * INLINE [

    oldproductcode, new product code

    58, AH67

    100, LK22

    37, CY13

    44, OL09

    33, PE55

];

Fact:

LOAD *,

ApplyMap('MappingTable', productcode, 'N/A') as New_Product_Code;

LOAD * INLINE [

    product, productcode

    bulb, 58

    radio, 100

    printer, 37

    computer, 33

];

View solution in original post

3 Replies
sunny_talwar

Try this

MappingTable:

Mapping

LOAD * INLINE [

    oldproductcode, new product code

    58, AH67

    100, LK22

    37, CY13

    44, OL09

    33, PE55

];

Fact:

LOAD *,

ApplyMap('MappingTable', productcode, 'N/A') as New_Product_Code;

LOAD * INLINE [

    product, productcode

    bulb, 58

    radio, 100

    printer, 37

    computer, 33

];

sunny_talwar

The idea is similar to the idea provided here:

Data Cleansing

its_anandrjs

Do you have this new field values in any table let me know.

oldproductcodenew product code
58AH67
100LK22
37CY13
44OL09
33

PE55