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

Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.

Reply
dmbd1904
Helper III
Helper III

Blanks as Nulls in Matrix

Hi I'm trying to convert blank values in my matrix to Zero's. The table looks as follows:

 

Forecast = CALCULATE(DISTINCTCOUNT(Task[UniqueTaskID]))

 

dmbd1904_0-1599738943698.png

 

I tried to create another measure as 

Forecast in Period = IF(ISBLANK([Forecast]),0,[Forecast])
but this returns the folowing tables with Rows repeated for some reason - It seems it's take Row names from other projects which have been filtered out.
 
 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@dmbd1904 

Adding +0 to the end of your measure is one quick way to fix this

 

Forecast = CALCULATE(DISTINCTCOUNT(Task[UniqueTaskID]))+0

 

 

Paul Zheng _ Community Support Team
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
  

 

View solution in original post

9 REPLIES 9
Anonymous
Not applicable

@dmbd1904 

Adding +0 to the end of your measure is one quick way to fix this

 

Forecast = CALCULATE(DISTINCTCOUNT(Task[UniqueTaskID]))+0

 

 

Paul Zheng _ Community Support Team
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
  

 

Greg_Deckler
Super User
Super User

@dmbd1904 - Generally that is:

Measure =
  VAR __Calc = <some calculation>
RETURN
  IF(ISBLANK(__Calc),0,__Calc)


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Hi @Greg_Deckler  , i tried that and got the same problem. See the image in my reply (It wouldn't let me include in the original post)

@dmbd1904 - Try

Measure =
  VAR __Calc = <some calculation>
RETURN
  IF(__Calc<0,0,__Calc)


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

No unfortunately that didn't work either

@dmbd1904 Can you post sample data as text that replicates this issue so I can mock it up?



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...
dmbd1904
Helper III
Helper III

SharedScreenshot.jpg

@dmbd1904 , typically this creates a left join and you start getting all values.

 

 

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi @amitchandak , I'm not sure I understand but is that what's causing the problem? Is there anyway to avoid the problem?

Helpful resources

Announcements
May PBI 25 Carousel

Power BI Monthly Update - May 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

May 2025 Monthly Update

Fabric Community Update - May 2025

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