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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. 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
V-pazhen-msft
Community Support
Community Support

@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
V-pazhen-msft
Community Support
Community Support

@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.

 

 

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

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
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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