Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

vishalmanu
Contributor

Unable to Map a field from one able to another using applymap

Hi, I am trying toprform an applyma function where i wanted to bring one date field from one table to another. Here i am attaching two excel files of sample data in which i would like to Bring the Product_Birth field from mapping table to original data table based on the common keys.

 

Here we have two common keys

1) Material(Data file). Name(Mapping File)

2)Material_Key_New(data file). ProductCode(Mapping file)

 

I have tried to do an apply map using the two common keys seperately but could not get succeed. It is not shpwing any data except for nulls. I could not find any error in it.

 

Kindly help with this scenrio

 

Thanks

Labels (3)
15 Replies
Highlighted
vishalmanu
Contributor

Re: Unable to Map a field from one able to another using applymap

Sorry, forgot to attach another file

MVP & Luminary
MVP & Luminary

Re: Unable to Map a field from one able to another using applymap

Please post the script that shows where you load the mapping tables and the applymap().  Or post a sample app if you can. 

-Rob

vishalmanu
Contributor

Re: Unable to Map a field from one able to another using applymap

Hello rob,

 

Please find the below the script that  i have used. Kindly note that i have used two apply map functions to check the feasibility of the Applymap functions based on two diff common keys.

 

Kindly look into this and provide me a solution

Mapping1:
Mapping Load
Name,
Product_Birth
FROM
[F:......QVD]
(qvd);

Mapping2:
Mapping Load
ProductCode,
Product_Birth
FROM
[F:\.....QVD]
(qvd);


Table1:
LOAD
Material,
Material_Group_P,
Com_Prod___Mat_Grp,
Material_Product_line_04__Medium_Name_,
Material_Packaging_type__Medium_Name_,
Material_Prod_hierarchy_P_Key,
Material_Group_P_Key,
Com_Prod___Mat_Grp_Key,
Material_Key_NEW,
//Applymap('Mapping1',Material,Null()) as New_Code,
//Applymap('Mapping2',Material_Key_NEW,Null()) as New_Lable,
Com_Prod___Mat_Grp_Key_NEW
FROM
[F:\.......QVD]
(qvd);

Thankks

Employee
Employee

Re: Unable to Map a field from one able to another using applymap

I can't find any matching values in the data.
vishalmanu
Contributor

Re: Unable to Map a field from one able to another using applymap

Hello Lisa

There are matching values between in the fields productcode from the mapping table to material_key_new in the origin table
Employee
Employee

Re: Unable to Map a field from one able to another using applymap

Not sure how it handles mixed formatting in the field

MVP & Luminary
MVP & Luminary

Re: Unable to Map a field from one able to another using applymap

material_key_new is an existing field in the QVD?  

vishalmanu
Contributor

Re: Unable to Map a field from one able to another using applymap

Yes. It already exists
CarlosAMonroy
Contributor III

Re: Unable to Map a field from one able to another using applymap

Hey Vishalmanu,

I did not download your sample files, but if you're trying to map 'Dates', it's important that you make sure both date formats from source to target table are the same. If you are getting nulls values, this could be the reason.

 

Thanks,

Carlos M