(ooxml, embedded labels, table is HB070514) WHERE Include='Y';
/* Example structure...
Include, WSDgrp, Code, newCode, grp2, grp3, ...
Y, N, A1, A, abcd, abc, ...
Y, N, A2, A, abcd, abc, ...
N, N, B1, B, bcde, bcd, ...
Y, N, B2, B, bcde, bcd, ...
Y, N, B3, B, bcde, bcd, ...
// I now have a "mapping table" called CodeMap which contains two columns named Code and newCode
// Turn mapping on MAPCode usingcodeMap;
// Load data from fact tables created elsewhere, each table has a field called Code.
LOAD * FROM [Fact table 1.qvd] (qvd);
Concatenate LOAD * FROM [Fact table 2.qvd] (qvd);
Concatenate LOAD * FROM [Fact table 3.qvd] (qvd);
//Turn mapping off
So, what I think should have happened by now is the contents of the field "Code" in each of the qvd files have had their values changed to the equivalents in the codeMap table. If record 1 of the qvd file has A2 in the Code field, record 1 of the now resident FactTable contains A in the Code field instead.
However, pre-viewing the data in the Table Viewer shows that A2 is still in that field.
Therefore, I'm not doing it right - the mapping load and map..using commands are not doing what I think they're supposed to do, or does map..using not work on qvd files?
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.
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.