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
Ricardo77
Helper II
Helper II

Best way to show zero instead of ' ' (blank)

Hello,

is there any automatic/easy way to [force] show 0 instead of blank in calculations?

 

i know we can do something like

somecalc=

var insidecalc=1+2x3

return if (isblank(insidecalc); 0; insidecalc)

I also would like to know, generally speaking, why i've seen cases in tables and matrixes where i can see blanks and zeros side to side?

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

6 REPLIES 6
Greg_Deckler
Super User
Super User

@Ricardo77 - I like to use the method you presented. Not sure about the other one, can I see a screen shot?


@ 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!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
amitchandak
Super User
Super User

@Ricardo77 , +0

somecalc= 1+2x3 +0

 

Jesus 🙂 ,

 

This this a general solution?

Don't know if i should laugh or cry (for being so simple)

 

Thanks and Regards

Hi , @Ricardo77 

You can  see blanks due  to the empty of the corresponding value . As  mentioned by @amitchandak ,  the best way to  avoid the situation where the empty value shows blank  is to add the value 0 at the end of the formula  . If you think your problem is solved, please mark helpful reply as a  solution or add you own solution  to close this thread.It will better help other community members  find the solution when they get the similar issue.

 

Best Regards,
Community Support Team _ Eason

Hello,

 

sorry but i would swear i've answered this: the idea of summing zero doesn't work on PBI 64 bits English for RS from January

Also, i've seen in MS pages that we shouldn't force zero to appear, with consequences to performance (as in the way i use, or in divide).

@Ricardo77 - There is an option for a column when in a matrix for example to click the drop down arrow and choose "Show items with no data"

Greg_Deckler_0-1599326317433.png

 


@ 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!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

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.