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: 
Anonymous
Not applicable

Matching Missing Field Values

Hello,

I have two field in the data load editor.   One field has the name of employees and the other has there respective title.

There are few employees who are missing titles. 

I wanted to know if there is a way I can match or fill in their title in the data load editor.

For example.

EmployeeName                     EmployeeTitle

Name1                                   RN

Name2                                   Physician

Name3

Name4                                   LPN

Name5

Name6                                   Janitor

I know that Name3 is an RN and Name 5 is a Janitor.  Is there a way I can match them to their respective titles.

I could do an if statement like the following

  if( EmployeeName   = 'Name3' , 'RN', EmployeeTitle) as "EmployeeTitle,

I wanted to know if there is a more effecient way of doing, maybe like mapping or something.  I have several users with that issue and I would rather not right if statements as I am afraid it may impact performance.

Please help.

Thank you in advance.

3 Replies
marcus_sommer

Yes you could just use mapping, see: Mapping … and not the geographical kind.

- Marcus

Anonymous
Not applicable
Author

Hi Marcus.

Thank you for posting a response. I looked into the link and it seems to discuss mapping values that already exist how about mapping nulls, and each null depending on the employees name might be different.

Any suggestions?

marcus_sommer

No it will work with NULL's, too - maybe in this way:

map:

mapping load * inline [

Name, Title

Name3, RN

];

load

     *,

     if(len(trim(EmployeeTitle)) = 0, applymap('map', EmployeeName , '#NV'), EmployeeTitle) as EmployeeTitle

from Source;


- Marcus