Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I've been struggling for a while@ now with the ApplyMap function. This is because one entry can not follow the original mapping structure. In my example the Netherlands should be mapped to Europe but there is one exception (sales related) as to why it should be linked to Africa. Both countries 'the Netherlands' do have a unique customer number. I tried countless ApplyMaps within the ApplyMap function but can't get it working.
Anyone suggestions?
Much appreciated.
ApplyMap('Mapping_Continent',Country, '') as Continent
Original Mapping | Preferred Mapping | |||
Country | Continent | Country | Continent | |
the Netherlands | Europe | the Netherlands | Europe | |
Germany | Europe | the Netherlands | Africa | |
Spain | Europe | Germany | Europe | |
South Africa | Africa | Spain | Europe | |
South Africa | Africa |
Regards,
René
Have you tried something like ?
If(Country='the Netherlands', 'Africa', ApplyMap('Mapping_Continent',Country)) as Continent
Have you tried something like ?
If(Country='the Netherlands', 'Africa', ApplyMap('Mapping_Continent',Country)) as Continent
It can be done by nested if statement.
One option may be create a flag field in the mapping with that special cases and map them with a condition.
This Way:
countrymap:
Country | Continent |
the Netherlands | Europe |
the Netherlands-Especial | Africa |
Germany | Europe |
Spain | Europe |
South Africa | Africa |
Table_to_apply_mapping:
LOAD * , ApplyMap('countrymap',Country&if(<EspecialCondition>,'-Especial'),'') as Continent
RESIDENT Source_Table;
Hi Tresesco. Thanks for guiding me in the right direction. I found that one 'the Netherlands' has a specific customer group linked to it. In the end this was the statement that did it for me:
if(CustGroupDesc='Export','Africa',ApplyMap('Mapping_Continent',Country,'')) as Continent
Thanks again and regards,
René