Stephane Viot on 07 Oct 2015 23:52:58
Count of should return 0 instead of '(Blank)' (looks better on a Dashboard)
- Comments (51)
RE: Count should return 0 instead of (Blank)
I added a new column 'Zero' with 0 to one of my table. Then add a Quick Measures to my Field in the Card and select Addition for Calculation. Then add Base Value to the column 'Zero' to display 0 on the card if the Field is Blank.
Hope that helps!
RE: Count should return 0 instead of (Blank)
I agree. A lot of upper management and leadership people at my company want to see 0, instead of a blank. Checking a box in the "Matrix" display options would save hours of work writing up a DAX code.
RE: Count should return 0 instead of (Blank)
Sure, you could do this using a new DAX measure, but wouldn't it be better if the Card visuals simply have a checkbox in the visual properties to show either (Blank) or 0?
RE: Count should return 0 instead of (Blank)
Has anyone had this problem before related to this idea? This idea would solve my problem as the + 0 and ISBLANK () solutions do not work for me. If there is anyone that has had my problem before (see: https://community.powerbi.com/t5/Desktop/KPI-Visuals-and-Blank-Issue-with-making-Blank-a-0/m-p/331941#M148417), please let me know if you found a different solution!
RE: Count should return 0 instead of (Blank)
Dax is working fine... blank is blank, not 0. And blank is displayed as blank in many visuals.
But the CARD VISUALISATION is not! it's the one that should be fixed, to either show a real blank or show at least a 0 (maybe with an option "show blank as 0" or something).
RE: Count should return 0 instead of (Blank)
Card is meant to be a first-class visualization, but without this fix must resort to creating card-specific measures. The '+0' solution isn't an option because the same measure is being used in a chart with date axis, and with '+0' I get dates appearing with 0 values when these dates should not be appearing at all.
RE: Count should return 0 instead of (Blank)
Putting more thought into it, I just needed to update my DAX with conditional logic which returned Blank () or 0 depending on the year in the evaluation context. So I don't need to write more measures. DAX is a lifesaver!
RE: Count should return 0 instead of (Blank)
Creating a measure for every card is too excessive and limits functionality......
RE: Count should return 0 instead of (Blank)
Adding zero to the measure does not work well since it breaks formatting on other visuals such as charts.
RE: Count should return 0 instead of (Blank)
Also note ... The best way of handling nulls is by using a find replace in Power Query.
Where ever possible data transformations should be performed in Power Query.