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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors