Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
GreatGreekYogurt
Contributor III
Contributor III

ApplyMap not working

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? 

Labels (4)
1 Solution

Accepted Solutions
Miguel_Angel_Baeyens

ApplyMap() should take the RegionID (the numeric value, the first column in your inline table) instead of the Region field.

View solution in original post

1 Reply
Miguel_Angel_Baeyens

ApplyMap() should take the RegionID (the numeric value, the first column in your inline table) instead of the Region field.