Skip to main content

Power BI

Declined

Count should return 0 instead of (Blank)

Vote (575) Share
Stephane Viot's profile image

Stephane Viot on 07 Oct 2015 23:52:58

Count of should return 0 instead of '(Blank)' (looks better on a Dashboard)

Administrator

You can do this with the COALESCE function: https://docs.microsoft.com/en-us/dax/coalesce-function-dax. For example:

= COALESCE(SUM(FactInternetSales[SalesAmount]), 0)
Comments (54)
Stephane Viot's profile image Profile Picture

Jorgemenas on 05 Jul 2020 22:36:37

RE: Count should return 0 instead of (Blank)

I agree having the zero makes the visuals look more elegant. Blank is go to know there is an error, but that doesn't make sense for a visual.

Stephane Viot's profile image Profile Picture

Nicolas Georgeault on 05 Jul 2020 22:33:34

RE: Count should return 0 instead of (Blank)

That could be a option by Element. Some visuals don't need this option and additionnal Zero could be just noise but on some visuals, turning on this option could be a great way to get niciest results.

Stephane Viot's profile image Profile Picture

Power BI User on 05 Jul 2020 22:28:55

RE: Count should return 0 instead of (Blank)

Yep adding 0 at the end of the measure worked @craig

Stephane Viot's profile image Profile Picture

Patricia on 05 Jul 2020 22:27:29

RE: Count should return 0 instead of (Blank)

THIS IS URGENT PLEASE!

Stephane Viot's profile image Profile Picture

Fadzlina Bakri on 05 Jul 2020 22:26:19

RE: Count should return 0 instead of (Blank)

I need a solution for displaying 0 instead of blank () in card visualization

Stephane Viot's profile image Profile Picture

Craig on 05 Jul 2020 22:26:10

RE: Count should return 0 instead of (Blank)

You can try Measure = Count() + 0

Stephane Viot's profile image Profile Picture

Jose Sarmiento on 05 Jul 2020 22:17:58

RE: Count should return 0 instead of (Blank)

This is a must!

Stephane Viot's profile image Profile Picture

Carl Visser on 05 Jul 2020 22:17:36

RE: Count should return 0 instead of (Blank)

'@JadeD I used this DAX; IF(COUNTROWS('Today')=0,0,COUNTROWS('Today')) Where 'Today' is a filtered table.

Stephane Viot's profile image Profile Picture

JadeD on 05 Jul 2020 22:15:34

RE: Count should return 0 instead of (Blank)

Hello @Scott Sugar - do you mind sharing what the DAX would look like for that?

Stephane Viot's profile image Profile Picture

Scott ssugar on 05 Jul 2020 22:14:43

RE: Count should return 0 instead of (Blank)

Actually I've worked around this by creating a new measure and using a dax formula to do my count