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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

how to define null values

Hi,

 

i was trying to define the null values as "Undefined" but my formulas arent working. what is the best approach for this?

Most of the columns are from one table. Region New Count ECM and Facility Key are from the same table.

Facility Table = COUNTRYNAME, FACILITYDES, FACILITYKEY

Fact Table = Region New, Count ECM, Facility Key

 

gheecalipes25_0-1720689962568.png

 

Wanted to Get this result:

gheecalipes25_1-1720690246663.png

 

Thank you.

 

1 ACCEPTED SOLUTION
anmolmalviya05
Super User
Super User

Hi @Anonymous,

There are various ways to deal with this: 
First, as mentioned by @bhanu_gautam, you can create calculated column using below approach and then use this into your visualisation

NewRegion = IF(ISBLANK(FactTable[Region New]), "Undefined", FactTable[Region New])
NewCountECM = IF(ISBLANK(FactTable[Count ECM]), "Undefined", FactTable[Count ECM])
NewFacilityKey = IF(ISBLANK(FactTable[Facility Key]), "Undefined", FactTable[Facility Key])

Note: using calculated columns can increase the size of your report because they add additional data to your data model. Each calculated column is stored in memory, and if you have large datasets, this can significantly impact the size and performance of your Power BI report.

Alternatively you can replace the null values with "Undefined"/"Unknown" from power query editor.

  • Open the Power Query Editor.
  • Select the column you want to modify.
  • Go to the "Transform" tab.
  • Select "Replace Values" and enter null in the "Value to Find" field and "Undefined" in the "Replace With" field.
  • Click "OK".

 

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



 

View solution in original post

2 REPLIES 2
anmolmalviya05
Super User
Super User

Hi @Anonymous,

There are various ways to deal with this: 
First, as mentioned by @bhanu_gautam, you can create calculated column using below approach and then use this into your visualisation

NewRegion = IF(ISBLANK(FactTable[Region New]), "Undefined", FactTable[Region New])
NewCountECM = IF(ISBLANK(FactTable[Count ECM]), "Undefined", FactTable[Count ECM])
NewFacilityKey = IF(ISBLANK(FactTable[Facility Key]), "Undefined", FactTable[Facility Key])

Note: using calculated columns can increase the size of your report because they add additional data to your data model. Each calculated column is stored in memory, and if you have large datasets, this can significantly impact the size and performance of your Power BI report.

Alternatively you can replace the null values with "Undefined"/"Unknown" from power query editor.

  • Open the Power Query Editor.
  • Select the column you want to modify.
  • Go to the "Transform" tab.
  • Select "Replace Values" and enter null in the "Value to Find" field and "Undefined" in the "Replace With" field.
  • Click "OK".

 

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



 

bhanu_gautam
Super User
Super User

@Anonymous , You can create new calculated column using ISBLANK to replace null value with whatever you want

 

COUNTRYNAME_Cleaned =
IF(
ISBLANK(FacilityTable[COUNTRYNAME]),
"Undefined",
FacilityTable[COUNTRYNAME]
)




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors