Forum Discussion
Hide blank columns Multi-Row Card View
Hi Anonymous,
If you don't like the blank card, you can create a measure to display zero instead of Blank.
Below is a DAX example for a distinct count of results.
# Results (blank free) =
var results = DISTINCTCOUNT('Table_name'[column_name])
return
IF(ISBLANK(results),0,results)
The variable counts rows; if the count equals 0, display 0; otherwise, display count.
I have a similar problem. To get the measure to deliver a 0 result instead of a BLANK() is not a problem. However, a 0 does not solve my problem. If my measure delivers blank, it is because the number can't be computed, it is UNKNOWN. Unknown is not the same as 0. So ideally I would like an empty string in that case, but the measure does not allow me to return a text in a measure that otherwise delivers a decimal. Conditional formatting or filter on the multi-row card does not work, because then BOTH values disappear, not just the one I don't want (I have two values on the card). Does anyone have an idea?
- MFelix3 years agoSuper User
Hi joarvat
In this case if you want to present the logic on a card the best option is to create an additional metric that you use only on the card, since has you refer the metric needs to be converted to text just use one of the logic below:
MEasure VAlue = IF([Measure] = BLANK(), "", [Measure]) Measure Value = COALESCE([Measure], "")