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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

Conditional Formatting based on other measure value no effect when blank

 I have a Matrix , I amusing the  condional Formating the Colors of the Values using a Field value  ...  .. which works .. But when there is no value for the Category ...  it defaults to White ... is there any way to show a zero on the Matrix if there is No Values for the Column ... and then it will use the color formatting for that column ...

 

The user would like to see zeroes, I have tried putting the measure in the value column ...  or just a count of a Field but since there are no records that match ..   

 the first line , and third line should be color coded and if possible display a zero ... 

 

Sample lines with No color.PNG

 

Thanks for any assistance ...

 

2 ACCEPTED SOLUTIONS
Anonymous
Not applicable

@ElenaN 

oldway

COUNT(SuccessionPlanning[Employee Name])

 

Newway

count(SuccessionPlanning[Employee Name]) +0 

I know it is weird ..
 
I started researching how to delete with Blank in Dax .. but nothing looks simple@Elena

View solution in original post

Hi @Anonymous ,

 

To update the measure as below should work well.

 

measure = var a = count(SuccessionPlanning[Employee Name])
return
IF(ISBLANK(a),0,a)
Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

6 REPLIES 6
ElenaN
Resolver V
Resolver V

Hello,

 

I don't know how the measure used in the report is defined, but an idea could be to add 0 to your calculation (e.g. 'Measure  = SUM(Amount) + 0' ). That way if you don't have values it will still show 0 and you can color code the value 0.

 

Regards,

ElenaN

Anonymous
Not applicable

@ElenaN 

 

Just tried that , did nothing ... I am doing a simple count(EmployeeName)   But the Employee will l be only in one column ... there are 6 possible choices ...   that is why it is tricky ...

On the tool tip it shows the value [BLANK]   but it would not take the + 0

So, you changed your measure from 'count(EmployeeName) ' to 'count(EmployeeName) + 0' and still does not show 0 in your matrix? 

 

Regards,

ElenaN

Anonymous
Not applicable

@ElenaN 

oldway

COUNT(SuccessionPlanning[Employee Name])

 

Newway

count(SuccessionPlanning[Employee Name]) +0 

I know it is weird ..
 
I started researching how to delete with Blank in Dax .. but nothing looks simple@Elena

Hi @Anonymous ,

 

To update the measure as below should work well.

 

measure = var a = count(SuccessionPlanning[Employee Name])
return
IF(ISBLANK(a),0,a)
Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
Anonymous
Not applicable

@v-frfei-msft 

 

This worked great for the Card Visuals ... But for some reason , the Default Matrix Visual still does not like it ..    it is just weird ...  and that is the best visual to show this data ...

 

I looked at my other Matrix visual , that is using  the same logic and it now displays the zero ... Noticed that the Column Values are coming from a Valid Table of Values ...  I was deriving from the data ..

 

Thanks the solution works ... when I use a Reference Table for the Columns ...  If it only comes from the data , it seems to have a problem .. 

 

Thanks

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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