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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Bizo
Frequent Visitor

Have Count Card show zero instead of (blank)

Hi,

 

I have multiple count cards on my dashboard that are filtering for 'New' items.  I am currently using conditional formatting that changes the color to the background if there are no values butmy director wants the card to show zero instead.  Since it's not a calculated value or sum as I've seen other DAX calculations solve, is there a way for the count card to show zero if there is no data?

1 ACCEPTED SOLUTION
barritown
Super User
Super User

I guess something like:

Measure = COALESCE ( COUNT ( 'Your Table'[Title] ), 0 )

 

You should put it to your visual instead of 'Count of Title'.

View solution in original post

5 REPLIES 5
barritown
Super User
Super User

I guess something like:

Measure = COALESCE ( COUNT ( 'Your Table'[Title] ), 0 )

 

You should put it to your visual instead of 'Count of Title'.

That worked I think, thanks!

Great. 

 

BTW, there is also another option to achieve this: 

Measure = COUNT ( 'Your Table'[Title] ) + 0

 

barritown
Super User
Super User

Hi,

 

I'd advise you to check documentation on COALESCE. Here's the link - https://learn.microsoft.com/en-US/sql/t-sql/language-elements/coalesce-transact-sql?view=sql-server-...

 

Your measure will look like:

Measure = COALESCE ( <your calculation>, 0 )

 

Thank you for the response but unsure what to put in <your calculation>.  So I haven't created any measures.

I basically have a card where I'm using 'Count of Title' and filtering for Category = 'Newly Identified'.  When there are no Titles with a 'Newly Identified' as the category it's showing as (blank) when I want it to show zero.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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