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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Helper II
Helper II

show items with no data as 0 instead of blanks

temp 1.PNG


Just a little background on the above table:


Project Name, Category Name, and Portfolio Name are from a table called 'Projects"


Actual, Committed are from a table called 'Expenses'


Projects is a one to many relationship with Expenses


In the above scenario, the project "cancer test project 5" has no related records in the Expenses table, so it is showing as blank, is there a way to show 0 instead


I have tried doing the following in the Projects table, but it gave unexpected results:  Actual = IF(ISBLANK(SUMX(RELATEDTABLE('Expenses'), [Actual])) = FALSE(), SUMX(RELATEDTABLE('Expenses'), [Actual]), 0)



Community Champion
Community Champion



Hi, please try with this Dax Formula in a measure:


ActualM =
IF (
    CALCULATE ( SUM ( Expenses[Actual] ) ) = BLANK (),
    CALCULATE ( SUM ( Expenses[Actual] ) )


Lima - Peru

View solution in original post

Community Champion
Community Champion

Even easier would be to add zero to your Measure

Then you don't need an IF statement to check if the expression returns BLANK ( )

So if your SUMX Measure works get rid of the IF statement and just add " + 0  "at the end

same with if you use any other expression (something like this for example)

Measure = CALCULATE ( SUM (table[column] ), FILTER (... ) ) + 0 

This will ensure you get a 0 when its blank!

Good Luck! Smiley Happy


UPDATE: March 2020

New DAX COALESCE function - returns the first argument that is not blank!

If all arguments return blank then COALESCE returns blank as well!

So if you need a zero returned and not blank and your Measures don't address the blanks on their own

Add a zero as the last argument in case all Measures return blanks!


COALESCE ( [Measure1], [Measure2], 0 )


View solution in original post

Frequent Visitor

One of those "**bleep** why didn't I think of this" moments just happened which is awesome.

simplesmente genial!! gratidão👏👍

Hey @Sean  , thank you!! Simple and great.

Not applicable

Adding +0 or COALESCE is effecting visuals and getting error visuals exceded the available resources



I used the '+0' to show ) instead of blanks and it was working well. But, today I used the same thing and it now showing blank instead of 0, is there an update or a configuration in the table that I need to change? Thank you!

Not applicable

Thanks for the solution 🙂





This is gold my friend, saved me many IF statements 🙂

Frequent Visitor

Hi Sean,

                     I have  a different issue when I added the +0 at the end of my measure it still does not display 0s for Blank.


Please refer the below syntax


VAR MaxDate = MAX ( 'Acctng_Period'[Date] )
'Acctng_Period'[Date]<= MaxDate,
ALL ( 'Acctng_Period')
)) , 0 , CALCULATE (
'Acctng_Period'[Date]<= MaxDate,
ALL ( 'Acctng_Period') )) + 0

Not applicable

@Aks-1  it looks like you can solve this by simplifying your DAX syntax by removing the IF statement. The way your current syntax reads is: SUM these values, if the result IS BLANK then return a 0, otherwise SUM the values. In DAX, you can't really do a SUM and check it for a TRUE/FALSE unless you're using it as a VAR. To appropriate the DAX syntax, I recommend seeing if the below formula will return your desired results:


VAR MaxDate = MAX ( 'Acctng_Period'[Date] ) RETURN
  SUM(LossTriangle_POC[WINS_Medical_Paid]), 'Acctng_Period'[Date]<= MaxDate, ALL ( 'Acctng_Period')
) + 0


There isn't a difference between your TRUE & FALSE clause calcuations, so I believe this updated syntax will correctly return the results you are looking for.

Hi @Anonymous ,

                                 Thank you so much for the reponse .Let me try that.




Not applicable

Wow @Sean ! I wish i had a thought process like yours. 

Not applicable

Kinldy assist, im still getting a blank on mine:(


Here's the formula: 

No of Breakdowns completed in same month = if('Coal Lab'[Start Date].[Month]='Coal Lab'[End Date].[Month],1 ,0)
With +0:
if('Coal Lab'[Start Date].[Month]='Coal Lab'[End Date].[Month],1 ,0) +0
Not applicable

@Anonymous  It looks like this is a calcuate column? And then you would like to sum-up the column? If this is the case try:  IF(MONTH('Coal Lab'[Start Date]) =MONTH('Coal Lab'[End Date]),1 ,0).


The trick with the +0 applies to creating measures, if you'd prefer to use that method it would look more like:

NoOfBreakdownsSameMonth = CALCULATE(COUNTX('Coal Lab',[<field to count>]),MONTH('Coal Lab'[Start Date]) =MONTH('Coal Lab'[End Date)) + 0


Let me know if this helps and/or works.

Not applicable

@Anonymous  the 2nd measure calc worked. Thanks you so much.

Not applicable

Heyy, this works! Thanks!

For me it needs some final tweaking. I'm using a measure with a start and end date and I dont want it to show zeros before the start and after the zero, because I have 3 measures that follow up each other. See screenshot. 


Quantitydeal = CALCULATE (
SUM ('table'[Quantity]);
FILTER('tableinvoice';'tableinvoice'[Posting Date]>=MIN('Dealsperiod'[Startdate])&& 'tableinvoice'[Posting Date] <=MAX('table2'[Enddate])))+0
So where the first gray line stops, the blue begins and after the blue line the second grey line starts. I dont want it to stay zero before these date periods. Do you have a solution for my formula?


Hi, When i do this to my measure it does add a 0 to the measure, however when i have my matrix it expands the rows so it repeats 0's for rows that it shouldn't show. I assume i need to relate it somehow?

Not applicable

@orangeatom What is your dax function? And have you a screenshot of the resulting matrix? 


Seems something like if the row total = 0 then return blank() for the row values, instead of zeros.

I found the solution by approaching the problem in a different view. What worked for my is to correctly keep blanks at the lowest grain of my measure which I now realize was a similar yet different problem. My solution was to create a measure with a variable and a return that correctly keeps the 0's.


Measure Hide Blanks =


Not applicable

Very elegant and saved me a bunch of time!

Helpful resources

July 2024 Power BI Update

Power BI Monthly Update - July 2024

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


Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors