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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Replace 'Blank" values with Zero on the Visualization

Hello everyone, I am having a hard time replacing the "Blank" values with Zeros on my visualization. The main visualization type I use to show numbers is "Card". Whenever I apply any filter, and there is no value for that, it shows 'Blank". I want to see 0 instead. I am not sure if it needs to be done through replacing the data on the report before uploading it to Power BI or on the dashboard itself by creating a new measure? Thanks for your help, Sona
2 REPLIES 2
itsmebvk
Continued Contributor
Continued Contributor

@Anonymous you can do this in two ways, 1) In query editor 2) Using new calculated measure

 

1) In Query editor:

 

1) in your power bi desktop click on edit queries

2)select column right click on it

3)choose replace value

4)enter "null" in find value in "replace value enter "0"

5)close and apply

 

you should see "0" wherever you have nulls in that column

One.png

 

 

2)Using new calculated measure

 

Create new measure using following code 

 

Sales_WO_Blanl = IF(ISBLANK(Sheet2[SalePrice]),0,Sheet2[SalePrice])

use this as a card . FYI see the attched PBIX

 

Two.PNG

Anonymous
Not applicable

Hello @itsmebvk, Thank you so much for your help. Neither ways worked actually. I use Count Distinct function for the data item (its an application number for participants). I also have another filter applied to that, so the total number of app numbers I have is 8, when I apply one of the filters, it shows blank while I want it to show Zero. Thanks, Sona

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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