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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
Anmolgan
Post Prodigy
Post Prodigy

Color the blank values apperaing in the Matrix visual?

I want to add a specific color to all the blank values that comes in my matrix table, now i am using 4 level of hirearchy and i want to add conditonal colors on all those blank values, a sample is given below where I need to add colors only to those values that are appearing as blank:

 

Screenshot (158)_LI.jpg

 

Any bright ideas how can I do this?

1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

Perhaps like the screen shot below? PBIX is attached.

 

image.png



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

6 REPLIES 6
amitchandak
Super User
Super User

if the values are coming blank the create a measure like this

Color COGS= if(isblank(AVERAGE(Table[COGS])),"red","white")

 

The in conditional formatting under advance control choose the field and then choose this measure.

You have to create three measures(or one measure can handle all) and apply them to all the columns.

 

Refer :https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-based-on-a-calc...

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak It does not works in my case and gives me everything in red and my blank fields are not coming as red.

Greg_Deckler
Super User
Super User

Perhaps like the screen shot below? PBIX is attached.

 

image.png



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler I was able to twick the problem using your message. Thanks for the help.

Great!



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler Well in my case as you can see in the screenshot, I dont have any text fields in my value section and all of them contains a numerical field, please elaborate how can i achive in this scenerio?

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Feb2025 NL Carousel

Fabric Community Update - February 2025

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