Reply
Frequent Visitor
Posts: 8
Registered: ‎11-19-2018

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
Regular Visitor
Posts: 30
Registered: ‎12-27-2018

Re: Replace 'Blank" values with Zero on the Visualization

@sonamyan 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

Frequent Visitor
Posts: 8
Registered: ‎11-19-2018

Re: Replace 'Blank" values with Zero on the Visualization

Hello @itsmebvamsi, 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