Hi, Map...Using will work only on Resident loads only. Please find the below from Help file.
The mapping is done last in the chain of events leading up to the field being stored in the internal table in QlikView. This means that mapping is not done every time a field name is encountered as part of an expression, but rather when the value is stored under the field name in the internal table. If mapping on the expression level is required, the Applymap() function has to be used instead.
- Create the map: Mapping Load....
- Load the data into memory: LOAD from QVD; (and repeat)
- Apply the map: MAP Code using codeMap;
- Turn off mapping: UNMAP Code;
Is this what you meant? The thing is, that's what I tried first after reading the Help file. That didn't work for me so I tried it as per my original post.
Have you double checked that your mapping values in field Code match the loaded ones? For example, load your mapping table without MAPPING prefix with appropriate field names, linking the two tables.
Are your tables linked correctly and does filtering in list box work?
If you are mapping string values, take care of leading / trailing spaces, etc.
There are limitations using a qvd for the Mapping table, but I AFAIR, using it for loading in the field values to map should be ok.
Thank you for your reply swuehl.
Prior to my attempt at using apply map I have loaded the mapping table as a separate table (not a mapping load) - the two tables were joined on Code as expected. I felt it would be better to remap the Code field instead of having a separate table (though I'm thinking of sticking with what works). So, yes, I have already done as per your suggestions.
Seems like you might need to un-optimize your QVD load also for the fields to be mapped:
LOAD * FROM [Fact table 1.qvd] (qvd) WHERE 1=1;
Concatenate LOAD * FROM [Fact table 2.qvd] (qvd) WHERE 1=1;
Concatenate LOAD * FROM [Fact table 3.qvd] (qvd) WHERE 1=1;
You can also look into using APPLYMAP() function in the LOAD statement instead of MAP ... USING