How to Replace Blank Value in Power BI Card Visualization

How to Replace Blank with 0 in PowerBI Visual, power query replace blank
Photo Credit: unsplash.com/dawson2406

Have you ever been using Power BI and wondered why you can see (Blank) in the Power BI card visualization? You might wonder if you have done something wrong or the data model is properly set. Seeing a blank in data visualization is a common problem in Power BI when there is no value for the selected field in the data model. In this post, we will get to know how to solve this issue:

Solution #1: Replace NULL or Empty Values in Data Model

In Power BI query-editor apply the following steps:

  • Open Power BI desktop, click on edit queries
  • Select the column that is causing the issue
  • Right-click the column
  • Choose to replace the value
  • Enter "null" in find value in "replace value enter "0" or "NA" or anything else depending on the type of the field if it is integer or string
  • Close and apply

You should see "0" wherever you have a NULL value in that column.

Solution #2: Using​ a New Calculated Measure​ or Column

Create a new column or a new measure using the following syntax:

m_MyNewMeasure = IF(ISBLANK(original-column-name),0,original-column-name)
original-column-name: This represents the name of the column you are using.

Then change the value to the new column and it should work.

Solution #3: Hide the Card Visualization if Value is Blank

  • For the card(s) with (Blank), go to Data label 
  • Right-click on color of the Data label
  • Choose conditional formatting
  • On Format By drop down choose Rules
  • On Base on field choose the field that is used for the card in question
  • Choose appropriate summarization you want (In our case we will chose Sum)
  • Under Rules select drop down if value and choose is blank 

So if the card value = is blank, choose a color which hides the Data Label of (Blank) such as making it white to hide the value which is blank in this case.

Conclusion

In this post, we explored 3 possible solutions on how to overcome blank values in Power BI. You can choose to apply any of these solution based on the use case scenario that you have.

Do you have better solution? Share it with us by leaving a commenting here.

Post a Comment

Previous Post Next Post