How to replace Blank with 0 in Power BI Visual

0 votes

Above in first visual i have taken count of region, however when i select slicer for a particular region (e.g L America), others are showing Blank... I want to show value as 0 when it shows blank on visual. Blank is coming because i have selected a particular region in the slicer . 

Feb 6, 2020 in Power BI by Sujit
• 120 points
108,793 views

3 answers to this question.

0 votes

Hi, Sujit

You can do this in two ways:

  • In query-editor (follow the steps below)

1) In your power bi desktop, click on edit queries.

2) Select column right-clicks on it.

3) Choose to replace the 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.

  • Using​ the new calculated measure​

Create a new measure using the following code ​:

Column = IF(ISBLANK(**original column**),0,**original column**)

**original column** - your name for the column you are using.

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

For master Power BI concepts, check out Power BI Training offered by Edureka.

answered Feb 7, 2020 by Gitika
• 65,770 points

Hi Gitika,

I'm trying same way to replace blanks in Matrix but this way is not working. Could you (or anyone who can) please help if have another solution for this

I'm writing DAX as below:

Distinct IDs=

var dist_id = DISTINCTCOUNT('Table'[ID)

return

IF(ISBLANK(dist_id),"0",dist_id)

Some of the blanks are getting replaced however, some are still there.


 

Hey, @There,

Have you tried both the way shown above?

0 votes

We can remove (Blank) by applying the Visual Level Filtering on the Slicer. Power BI didn't allow us to apply Visual Level Filtering earlier which was a major drawback. In June 2019, Microsoft released an update in which we can apply the Visual Level Filtering on the slicers as well.

Elevate your data analysis skills to expert levels with our in-depth Mastering Power BI Program. Gain the advanced expertise to analyze, visualize, and report data like a pro.

answered Dec 15, 2020 by Roshni
• 10,480 points
0 votes

so you are using the raw source data, is it correct?

So its easy to you just make new column with this code

Column = IF(ISBLANK(**original column**),0,**original column**)

**original column** - your name for the column you are using.

Then change the value to the new column and it should work :slightly_smiling_face:

answered Dec 15, 2020 by Gitika
• 65,770 points

Related Questions In Power BI

0 votes
1 answer

How can i see my plugin name in the Power BI Visual plugin List ?

there is a couple of errors in your ...READ MORE

answered Nov 8, 2018 in Power BI by Upasana
• 8,620 points
1,415 views
0 votes
1 answer

To create link visual in Power BI

You can disable sandboxing by adding this ...READ MORE

answered Nov 22, 2018 in Power BI by Upasana
• 8,620 points
903 views
0 votes
1 answer

How to combine your data or tables in Power BI?

Power BI includes Query Editor which is ...READ MORE

answered Feb 27, 2019 in Power BI by Phalguni
• 1,020 points
2,896 views
0 votes
1 answer

How to Install Power BI in Windows

Hi, Anitha Go to this Link https://powerbi.microsoft.com/en-us/downloads/ Then click on ...READ MORE

answered Feb 28, 2019 in Power BI by Cherukuri
• 33,030 points
1,048 views
0 votes
1 answer

Install Power BI Desktop

It’s a pretty simple process. All you ...READ MORE

answered Oct 9, 2018 in Power BI by Kalgi
• 52,350 points
1,020 views
0 votes
1 answer

Few tips before I start creating Power BI dashboard

It’s always advisable to begin with the data ...READ MORE

answered Oct 9, 2018 in Power BI by Kalgi
• 52,350 points
885 views
0 votes
1 answer

How do I format the KPI in Power BI

format the KPI by selecting the paint ...READ MORE

answered Oct 9, 2018 in Power BI by Kalgi
• 52,350 points
1,233 views
+1 vote
1 answer
+2 votes
3 answers

How to replace null values with custom values in Power BI(power query editor)?

Hi Nithin, To fill or replace the null or ...READ MORE

answered Mar 8, 2019 in Power BI by Cherukuri
• 33,030 points
159,792 views
0 votes
1 answer

I have a web API with basic authorisation and username and password. How do i connect to it in Power BI?

Hey, @There, I found your query is quite ...READ MORE

answered Oct 29, 2020 in Power BI by Gitika
• 65,770 points
3,575 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP