One of my colleagues was working on a Power BI report, where some of the values in his matrix visual were showing up as blank. From a user’s point of view, blank cells can be confusing. So, we needed to show zero instead of blank in the matrix visual.
In this Power BI tutorial, I’ll show you three simple ways to replace blank values with zeros in the Power BI Matrix visual:
- With the help of the COALESCE Function in Power BI
- Using the Power BI ISBLANK Function
- Using Power Query Editor in Power BI
Method 1: Replace Blank with Zeros in Power BI Matrix using COALESCE Function
For the first method, I will use the COALESCE function in Power BI to replace blank cells in the matrix with zeros.
The screenshot below displays a Matrix visual with ‘Sales’ data, where the Row fields: Category and Product, along with the Columns: ‘Year‘ and Values represented as ‘Sales Quantity‘.
From the matrix, you can see that it includes blank values for[ Keyboard (2024)] and [Laptop (2025)].

Now, I wanted to show zeros instead of blank values in the above-shown Power BI matrix.
To achieve this, we need to create a Power BI measure using the COALESCE function. You can check an article on creating a measure in Power BI.
Now follow the steps below:
- On the Power BI report canvas, click on the matrix visual that is showing blank values. In my case, I selected the matrix that displays:
- Rows: Category, Product
- Columns: Year
- Values: Quantity

- Then, from the Home tab, click on the New Measure icon to create a measure. It navigates to another window, where you can add a Measure. Provide the expression placed in the code below.
Blank Quantity = COALESCE(SUM(ProductSales[Quantity]), 0)Replace ‘ProductSales[Quantity]‘ with your data column name.


- After that, click on the Report view. From the Visualization pane, replace the value with the measure you created.

- Now, you can see that the blank values present in a matrix are replaced with zeros. Have a look at the reference image.

This is how to replace blanks with zeros in a matrix visual in Power BI.
Check out: Display Excel Spreadsheet in SharePoint Online
Method 2: Replace Blank with Zero in Matrix Power BI using ISBLANK Function
Let me consider the same example using another function, specifically the ISBLANK function.
As you already saw, the matrix visual includes blank values. Here, I will place the screenshot again for your reference.

Now, I wanted to display the zeros instead of blank cells in the matrix shown above.
Here, I will create a new measure using the ISBLANK function and then replace the value with the newly created measure.
- On the Power BI Home page, click on New Measure and create a measure with the following expression.
Product Quantity Zero = IF(ISBLANK(SUM(ProductSales[Quantity])),0, SUM(ProductSales[Quantity]))From the expression, replace ‘ProductSales[Quantity]‘ with your data column name.

- Then, replace the created measure in the Value field of the Visualization pane, as shown in the image below.

Output:

Learn More: Display Average Instead of Total in Power BI Matrix Visual
Method 3: Display Zero Instead of Blank in Power BI Matrix
We can also display blank values as zero by using the Transform data option in the Power BI Matrix.
Suppose you have created a Matrix visual as shown in the image below, which consists of blank values, and you want to replace them with zeros.

See the steps mentioned:
- On the Home tab of Power BI desktop, click on the Transform data option.

- It navigates to the Power Query editor, where you can select the data table that is connected to the Matrix.
- Select the column where you have blank values [Quantity]. Then, select the “Replace Values” option, located under the Home tab.

- Next, the Replace Values pane opens up, configures the following properties, and then clicks the OK button.
- Value to Find: Enter null.
- Replace With: Provide ‘0’.
Then, click the Close & Apply icon located at the top left side of the window.

Output:

This way, you can show zeros instead of blank values in the Power BI Matrix visual.
From this tutorial, you have learned how to replace blank values with zeros (0) in a matrix visual in Power BI using three different methods. I hope you find this article informative. Please feel free to leave your suggestions and queries in the section below.
Read More About Power BI Matrix:
- Turn Off Grand Totals in Power BI Matrix
- Set Column Width in Power BI Matrix Visual
- Sort Column Values in Matrix Visual Power BI
- Power BI Matrix Visual Conditional Formatting

After working for more than 18 years in Microsoft technologies like SharePoint, Microsoft 365, and Power Platform (Power Apps, Power Automate, and Power BI), I thought will share my SharePoint expertise knowledge with the world. Our audiences are from the United States, Canada, the United Kingdom, Australia, New Zealand, etc. For my expertise knowledge and SharePoint tutorials, Microsoft has been awarded a Microsoft SharePoint MVP (12 times). I have also worked in companies like HP, TCS, KPIT, etc.