Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
nickelcap
Frequent Visitor

"(Blank)" in Card Visual For 0 Count

Hi Everyone,

 

I'm not sure if I encountered a bug or if I'm doing something incorrectly. I put together a card visual that provides a count of the assets that meet a certain set of criteria. I'm using three columns for the visual: "Asset", "Colour Formatting", and "Latest". "Asset" provides the asset name; "Colour Formatting" reports a 0, 1 or 2 based on certain criteria; and "Latest" finds the latest time stamp for each asset. If that's not clear, here's a snippet of the data:

 

PBI (1).png

 

And here's a snippet of the set up for the visual:

 

PBI(2).PNG

 

The count is set as Count (Distinct). Now, the filters I'm applying will mean that there will be 0 assets in the count (I know this by manually checking), but it shows '(Blank)' in the card. I know this set up works because I'm using something very similar for another count, the only difference being that Colour Formatting is set as 2. Is there a workaround for this?

 

Thanks,

 

Dan

 

 

 

 

 

1 REPLY 1
Anonymous
Not applicable

Ya, this is the "by design" behavior.  Taking a sum of a "no rows" returns a blank, not zero.  Same with distinctcount etc.

 

I would just write a custom measure:

  My Distinct Count := DISTICTCOUNT(MyTable[MyColumn]) + 0

 

The +0 will obviously have no impact on any "valid" result, but Blank + 0 will be 0, and should give you what you want.

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.