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)
RE: Count should return 0 instead of (Blank)
It would be nice if you add this feature to Power bi.
RE: Count should return 0 instead of (Blank)
You should have the option to return Blank or 0
RE: Count should return 0 instead of (Blank)
If you have multiple cards and the value shows blank then it's time consuming to write an IF measure for every card. Just seems time consuming and not a very efficient way to display values. Suggestions of putting 0 or None automatically generated from DAX would make it much easier to track values.
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!