Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
alexsid-qlik
Contributor II
Contributor II

Using Applymap() function

Dear community,

I am trying to use the ApplyMap() function. But it does not create the information I need.

What I want is to connect my Partnumber with the respective name.

I load the mapping data first.

Map1:
Mapping LOAD
    Partnumber,
    Name
FROM MapData;

Then in my main data load I use this

LOAD 
Partnumber, 
ApplyMap('Map1', Partnumber, null()) as Name
FROM MainData;

But it does not connect! What am I doing wrong?

 

Would be glad for some assistance.

Best, Alex

Labels (2)
1 Solution

Accepted Solutions
Mark_Little
Luminary
Luminary

Looking at the scrip,t the applymap is not the issue.
It sounds like a data modelling issue or possibly an issue with the part numbers not matching. If the part numbers look the same it maybe worth adding a trim() on load to rule out blank spaces.

Mark

View solution in original post

6 Replies
m_woolf
Master II
Master II

What you have looks OK to me. What results are you getting? If you're getting nulls, perhaps the Partnumber from MainData doesn't match the Partnumber from MapData.

alexsid-qlik
Contributor II
Contributor II
Author

Hi @m_woolf

For some Partnumbers I get the matching Name. But additional data like Sales is null.

Then I get the same Partnumbers but without matching Name. Instead the Sales appears. So basically is the two table are not concatenated. 

Should I try a concatenate load? 

Mark_Little
Luminary
Luminary

Looking at the scrip,t the applymap is not the issue.
It sounds like a data modelling issue or possibly an issue with the part numbers not matching. If the part numbers look the same it maybe worth adding a trim() on load to rule out blank spaces.

Mark
alexsid-qlik
Contributor II
Contributor II
Author

Hey Mark,

 

you were right!

I did not know about the trim() function. Very useful!

Thanks a lot

alexsid-qlik
Contributor II
Contributor II
Author

Seems to be the case...Somehow the numbers included blank spaces.
Thank you!
alexsid-qlik
Contributor II
Contributor II
Author

Actually another problem appeared: Now every Partnumber is appearing twice.
How comes that and how to get rid of it?