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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
009co
Helper IV
Helper IV

Blank matrix values change to zeros

Trying to get my matrix blank values changed to zeros.  Matrix looks like below screenshot. 

 

I am doing IF ISBLANK calculation test on the calculation.

 

% Available =
IF (
    ISBLANK(SUM('Table'[Available]) / SUM('Table'[Budget])),
    0,
    SUM('Table'[Available]) / SUM('Table'[Budget])
)

 

If there is no result then it is blank, right?  What am I missing? It doesn't return zeros, just stays blank.

 

009co_0-1663346203888.png

 

 

 
1 ACCEPTED SOLUTION

3 REPLIES 3
tamerj1
Super User
Super User

Hi @009co 
The Project column and the Department column both must be independent dimension tables linked to the fact table through the respective columns. You can refer to my solution for this post just today Re: how to replace blank fields to zero in matrix ... - Microsoft Power BI Community

Moreover the measure can be written in more simple syntax as follows

% Available =
COALESCE (
    DIVIDE ( SUM ( 'Table'[Available] ), SUM ( 'Table'[Budget] ), 0 ),
    0
)

 

Project column and the Department columns are in same query as the values.

 

So yes it is obvious then that the blank values are because there are no rows in the query with those values for those dimensions.

 

Can't DAX replace these blanks with zeros without have a model with dimensions tables? 

 

 

@009co 
I don't think so

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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