Forum Discussion
Searching between two columns for a value within a range (Zip Code)?
One way I can think to make this work, which may or may not work with what you need to accomplish, would be to recreate your zip code ranges table to include every possible unique zip code. This works well within PowerBI's preferred many-rows-few-columns structure, and Zip then becomes a unique identifier that you can connect to the zips in the customer table (a one-to-many relationship). So instead of StarZip, EndZip, and RepFirm, you would have two columns:
Zip RepFirm
0 Firm A
1 Firm A
2 Firm A
3 Firm B
4 Firm B
..... .....
You could also include columns for "ZipRange", "ZipStart", or "ZipEnd" if you need them. Then all you have to do is create a relationship between the customer account table Zip column and the ZipCode table zip column and RepFirm will automatically be matched up with the customer. That would save some formula writing.