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
ReubenS
Advocate I
Advocate I

Matrix to show "0" instead of blank values for a count

I have a matrix with a generic rows of distinct values, in the example I have used colors and then the field created month for the coloumns. I am trying to show in a matrix when there is an empty field I would like it to show "0" ,as its a count instead of nothing.

 

I have tried :

= COALESCE(COUNT([Field1]), 0)
 measure = IF(ISBLANK(Count[Field1]),0,Count[Field])
 
measure = Count([Field1]) +0

 

ReubenS_0-1674642265259.png

 

4 REPLIES 4
ReubenS
Advocate I
Advocate I

I have attempted all sugestions but none have worked. Ill leave this thread open if I find a solution I will post about it.

LQuedas
Resolver II
Resolver II

Hey @ReubenS 

 

you can try this one:

 

=

 Var _TOTAL= COUNT([Field1])

 

RETURN IF(_TOTAL = blank(),0,_TOTAL)

 

Cheers, LQ

Thennarasu_R
Responsive Resident
Responsive Resident

Hi @ReubenS 
try this measure,
Measure=if(calculate(count(Field))=Blank(),0,calculate(count(Field))

Thanks and Regards
Thennarasu

amitchandak
Super User
Super User

@ReubenS , This works best when the color is coming from a separate dimension

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.