Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Everyone,
I have 2 Tables. Table A have a Name field which contains Full Names of the employees. Table B also have Name field, but it has only Last Names. So I am trying to replace the names of table B with Table A.
I tried using if statement
Load
Name,
if(Name = '[Last Name]', [Full Name]) as Name1
its giving me error saying full name not found.
I also heard about mapping and tried to map. But not exactly sure how it will work. so I think I messed up.
Can anyone please let me know where I was going wrong or if there is any other way I can do that.
Thanks.
You can find some information about MAPPING e.g. here:
Basicall, you first need to define your mapping table. You would need to load the table with full names, the create two fields, the key field will show the last names created from full name (I assume for this example that it's the last word in a space searated sequence of words), second field will show the value to map, the full name itself.
NameMap:
MAPPING LOAD
Subfield( [Full Name], ' ', -1) as F1, [Full Name] as F2
FROM YourTableWithFullName;
YourNameTable:
LOAD
[Last Name],
ApplyMap('NameMap', [Last Name], 'No fullname mapping found') AS Name1,
...
FROM YourTableWithLastNameOnly;
Hi,
I tried that and its throwing me script error saying
Field not found: <[FULL NAME]>
and
Field not found: <[LAST NAME]>
My script was something like this
I am not sure where I am doing it wrong.
Your field is really called JAMES YOUNG? Sounds linke a field value to me.
But the article you provided worked. Thankyou so much
Yes it is a field value.
I think, there is miscommunication. sorry.
Hi Soumya,
Attach some sample data and let us know your expected output so that it would be easier to understand and provide better solution.
Please check below link for getting the answers quickly from community.
Qlik Community Tip: Posting Successful Discussion Threads
Regards,
Jagan.
Dear Soumya,
Use Inner Join to replace your Name field.
Kind regards,
Ishfaque Ahmed
Hi Soumya,
Could you please share the sample data ...so that it will be helpful for us to undestand the data and suggest a solution for the same
Sample App??