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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
Anonymous
Not applicable

Replacing Blanks with text "Unmapped"

Hi,

 

I want to replace Blanks with text "Unmapped".Itried using  "ISBLANK'  function , however I was not able to replace the Blank value with the text as the Dim column is not having any blank values and the Blank which I am seeing in my PBI visual is due to Joining Dim with tables. 

 

 

Thank you in Advance

 

 

7 REPLIES 7
Vickar
Advocate II
Advocate II

create a calculated column in the fact table with the below code

 

 

PIN = 
var _pin = RELATED('tablename'[PIN])
return
IF(NOT(ISBLANK(_pin)),_pin,"Unmapped")

 

 

and replace the PIN column from dim to PIN column from fact  in the required visuals. this would replace the "blanks" with "unmapped"

 

 

amitchandak
Super User
Super User

@Anonymous 

In Edit Query/Data transformation mode you have a Replace values option. You can use that.

https://support.microsoft.com/en-ie/office/replace-values-power-query-28256517-f1e9-4dc3-832f-45786e...

 

In DAX

New column = if(isblank([Column]),"Unmapped",[column])

from March 2020, you can have

Coalesce([column],"Unmapped")

 

Also refer:https://www.syntelli.com/easy-guide-to-bulk-replace-values-in-power-bi-or-power-query

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Hi Amit,

 

Thank you 

 

I have already tried Coalesce & isblank function , however I was not able to replace the Blank value.

 

 Replace values option : I do not see any blank value in the column.Blank value is only comming after joining the Dimension table with fact tables.

 

Ideally, you should not get blank from the dimension side.Are they coming from dimensions? If so make sure your dimension has all the values

 In a case coming from fact.

for the measure, you can do

+0

or

& "Unmapped"

Depending on the data type

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Hi Amit,

 

There are no blank values in Dim column(PIN) .I guess those are the records comming from fact table for which there is no pin assigned in the dimension table.So we have to display those blank values as "Unmapped" in report .

 

PINEHCEHire
 5340
Admin3250
Architecture3020

 

We need to display as below:

PINEHCEHire
Unmapped5340
Admin3250
Architecture3020

create a calculated column in the fact table with the below code

PIN = 
var _pin = RELATED('tablename'[PIN])
return
IF(NOT(ISBLANK(_pin)),_pin,"Unmapped")

and replace the PIN column from dim to PIN column from fact  in the required visuals. this would replace the "blanks" with "unmapped"

 

 

Anonymous
Not applicable

HI @Anonymous,

This blank category is generated by your relationship filed and not really existed in your table, I'd like to suggest you create a table to extract all categories add 'Unmapped' category to it. 

NEW Table =
UNION ( VALUES ( Table[Pin] ), ROW ( "Pin", "Unmapped" ) )

After these, you can use it as the category of the table and write measure formulas to lookup corresponding records. 

In addition, can you please share some dummy data with a similar data structure to test? It will help to test and coding formulas on it. 

How to Get Your Question Answered Quickly 

Regards,

Xiaoxin Sheng

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.