I have attached an application to provide a solution to your issue using joins and if statements in the load scripts. Basically, I attached the valid Market Segment Numbers and Market Segments to each row in the Market table. If available, I replaced the original value with the valid value.
Let me know if this helps.
Test.qvw 113.2 K