Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
sarah2_williams
Helper III
Helper III

Replacing blank (unmatched) values in a table with 'N/A' when no match found in lookup table

Hi all,

 

Hopeing this is a relativly simple one.

I have a data table with UK post code data included, and a lookup table that matches the Post code with the UK Region - as below:

UK Region Lookup.JPG

The postcode in the original data is input by free text, so there are times when the customer has not entered a valid postcode (something we are looking at seperately)

data table.JPG

 

This means that when I create a relationship between the Postcode in my data and my lookup table, to return the UK Region, anything that doesn't match shows as blank in the table in my report:

Report Table.JPG

 

What I want to do is make it so that anything that doesn't match to the lookup values shows as 'Postcode not supplied by customer'

 

Any advise on the best way to do this is much appreciated 🙂

 

Thanks

Sarah

 

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @sarah2_williams 

 

Add a row with a code for that "Postcode not supplied by customer" then on Power Query do a merge between the two tables and where the field is null replace by that new code that you added that will give you a connection to that specific row when you do the relationships.

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

1 REPLY 1
MFelix
Super User
Super User

Hi @sarah2_williams 

 

Add a row with a code for that "Postcode not supplied by customer" then on Power Query do a merge between the two tables and where the field is null replace by that new code that you added that will give you a connection to that specific row when you do the relationships.

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Helpful resources

Announcements
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!