Discussion Board for collaboration regarding Qlik DataMarket.
Can some one assist me hot to apply map.
I have loaded the mapping table with 4 columns.
I want to map City column and populate State, Country And Region.
Go to Solution.
Sample Script using the Mapping Tables:
(html, codepage is 1252, embedded labels, table is @1);
ApplyMap('MappingTable1', City, Null()) as State,
ApplyMap('MappingTable2', City, Null()) as Country,
ApplyMap('MappingTable3', City, Null()) as Region,
(html, codepage is 1252, embedded labels, table is @2);
I guess create 4 mapping tables out of your one table:
Or you can simply perform a left join.
Mapping is just to translate one value to an other value.
The syntax for the mapping table is "From", "To". Just two columns.
Mapping Load * Inline [
ApplyMap('mapCityToState', City, 'missing state') As State
The table created with "Mapping Load" is automaticly dropped when script reload is finnished.
If You want to add the State, Country and Region columns to Your table, and accept NULL as result where mismatch, I recommend "Join" insted.
Load City, Prod, Sales
Left Join (Table_A)
Load City, State, Country, Region
Hope this helps.
as sunny said try with left join