Mapping tables are discarded at the end of the load, so you can't use them, and so you can't use applymap() to do this, even though it seems like the obvious solution. If Map is a regular table... I'm still not thinking of a good way to do it.
I am thinking of a bad way to do it, though, assuming you want to stick with editing a table and not an expression. Use a loop during the script to create a string like this and assign it to variable vMap:
Untested, but the script might look something like this (assuming your Map table is already loaded, was loaded in numeric sequence, no sequence values are skipped, and the resulting text is in field "Text"):
SET vMap='pick($1'; FOR I = 0 TO noofrows('Map')-1 LET vMap = vMap & ',' & chr(39) & peek('Text',I,'Map') & chr(39) NEXT I LET vMap = vMap & ')';
Then $(vMap(your formula)) should return the text corresponding to the number. If we're lucky.
Ah, but it only works if you have a single company selected. Set analysis is only evaluated once for the whole chart, not once for each row, causing the problem.
But that DOES imply that you could do it with a logical island and an IF:
It works just fine.
But now I'm curious, since I don't have to make my own sample file. Yep, my approach worked just as written, once I added the missing semicolon at the end of the LET statement.
The only(if()) approach seems a lot better than mine, though, so that's what I'd use. It's also more robust, because it doesn't require that your mapping table be in sequential order and not skip any numbers. For that matter, it can be used with any sort of mapping, not just an integer to text map. All three approaches can be seen in the attached file.