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 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 particular region in slicer .

Feb 6, 2020 in Power BI by Sujit
• 120 points
17,104 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.

answered Feb 7, 2020 by Gitika
• 65,850 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.

answered Dec 15, 2020 by Roshni
• 10,400 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,850 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
195 views
0 votes
1 answer

To create link visual in Power BI

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

answered Nov 21, 2018 in Power BI by Upasana
• 8,620 points
147 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
805 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
• 32,890 points
136 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,290 points
187 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,290 points
159 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,290 points
195 views
+1 vote
1 answer
+3 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
• 32,890 points
45,729 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,850 points
244 views