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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.