Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Good day to everyone!
I have a simple question. I want to rename values in field Region - some of them shows 'Wst' instead of 'West' or 'S0uth' instead of 'South' and so on... I did some research and got an idea that ApplyMap would be best solution (correct me if I'm wrong). Created quick inline table to give each region an ID since other tables doesn't have common keys.
Maptable2:
Mapping LOAD * INLINE [
RegionID, Region
1, East
2, West
3, North
4, South
5, Central
];
Then in my initial fact table 'RegionTable', I'm creating the same ID for each region with Pick(WildMatch()) functions. Using these functions with idea that they can perform string search by first letter:
Pick(WildMatch([Region],'E*','W*','N*','S*','C*'),'1','2','3','4','5') as [RegionID]
And then in resident load from 'RegionTable' I am using ApplyMap
ApplyMap('Maptable2',[Region]) as [Region New]
But it is not working, the 'S0uth','Wst' along with others is still there. What am I doing wrong here?
ApplyMap() should take the RegionID (the numeric value, the first column in your inline table) instead of the Region field.
ApplyMap() should take the RegionID (the numeric value, the first column in your inline table) instead of the Region field.