Conditional Formatting for Blank Rows

Hi all,

To achieve a P&L style look I am using conditional formatting to change the background colour of certain cells in a matrix. It is working nicely except where some profit centres don’t have income (ie. the value shows as blank), the conditional background colour isn’t applied.

See the below image. The first, second and last profit centres have income and hence the line turns green. However the third, fourth and fifth profit centres don’t have income and the conditional formatting isnt applied.

Is there a workaround for this, preferably that won’t kill my performance?

If more information is required, please let me know.

Cheers
Kaycee

Hi @kaycee

A sample PBIX would be a great help so we can see your formula in order to help.

How are you calculating the background colour, via DAX and pointing it to that measure? If you do it that way, you can make use of the ISBLANK function, that I should imagine will help your issues.

ISBLANK – DAX Guide

1 Like

Thanks @jamie.bryan for taking the time to respond.

I’ve mocked up an example of how this works. Note that I have a single measure to define the background colour referring to the row header, not the measure value as that is irrelevant. This makes it really easy to both apply to many reports and also tweak (ie. change a shade of grey) and automatically have every report update regardless of what measure they’re using (ie. ignoring whether the report is on MONTH, YTD etc - only the report level matters).

I use ISBLANK a lot but am unsure how to incorporate it into this example given it isn’t referencing a measure, but the header row.

In the example provide both the Total Income and Total Expenses rows should be fully grey but where there aren’t values, they are white.

Any suggestions would be hugely appreciated.
Conditional Formatting Issue.pbix (26.9 KB)

Apologies I didn’t see the matrix part of your query. That’s a bit beyond me I’m afraid since it’s not looking at the actual values. Hopefully someone can jump in to help!

Thanks @jamie.bryan

bumping this post

Hi @kaycee! We noticed that your inquiry was left unsolved for quite some time now.

Looks like your inquiry was out of the experts and users’ bounds.

We strive to answer ALL inquiries in the forum. However, if you are sure that you provided all pertinent context to your concerns and read how to use the forum more effectively and still find your question unanswered, you can check out tutorials to learn this yourself as your membership also comes with relevant resources that may help you with your Power BI education.

While our users and experts do as much as reasonable to help you with your inquiries, not all concerns can be attended to especially if there are some learnings to be done. Thank you!