I have several files. Each file has Company Name as one of the fields.
One file has the Company Names that I want to use. (e.g., Smith Co., Inc). The other files have variations on the desired name (e.g., Smith Co ; Smith Company ; etc.)
I am trying to use the Mapping Load function to map all the variations of the name to the desired name, so I can use that name in all the linking and analysis.
I created a mapping file (called alt_names.xlsx) with alternate names in the first column (x), and the desired name in the second column (y).
I used the following statement to load the mapping file:
Mapping Load x,y from alt_names.xlsx
(ooxml,embedded labels, table is Sheet1);
After loading this file, the Company Name list in the Qlikview file shows both names, rather than the desired company name, and I am not getting the linking between the information for the specific company in the files.
I would appreciate suggestions to correct this situation. Thanks in advance.
From the syntax it looks ok. but I think logically it should look more like this:
Mapping Load [Company Name] as LookupValue, RefCode as ReturnValue
from alt_names.xlsx (ooxml, embedded labels, table is Sheet1);
ApplyMap('CompanyMap', [Company Name], '#NV - ' & [Company Name]) as [Company Name New]
from MainData.xlsx (ooxml, embedded labels, table is Sheet1);
Means you need to load your main-data and replacing there the wrong names with the correct ones. Further, the fieldnames within a mapping-table are not important but the order is (I highlighted this order).
All loaded fields must be existing within the sources, the fieldnames within the mapping-table aren't important, only the order of them is and that it are two fields. The applymap() is executed within the main-table and need to contain the map-name, the Lookup and optional a default-value.