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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Issues with conditional formatting

Please help!

I have a measure called "Conditional Formatting"

I'm using this field to apply color to field "Last Sign-off". If the measure =0 then no color, = 1 then green, =2 then yellow, =3 then red.

For just a few select Document Names, the color isn't being applied as expected. I've filtered my matrix and the evidence tables used to explore the issue down to one of the problem documents (EasyDens warm water flush) and two well behaved documents (Sugar boiler (50 steam) and Basic rig CIP/SIP)

Table for which I'm trying to get the conditional formatting to appear correctly, but it won't:

hmuzzy_1-1623279065577.png

 

This table shows that measure "Conditional formatting" is, in fact, 3 for Document EasyDens water flush (and therefore should be red but it isn't above)

hmuzzy_2-1623279479413.png

 

To add to the evidence something is fishy, if I add the same Document Name column that's already a Row Header as a Value, all of a sudden the correct color is applied to the Last Sign-off (first table below). But, as soon as I take that 2nd value out of the table the wrong conditional formatting comes right back. The same is true for adding other fields as a second value, including the conditional formatting measure. It just doesn't want to behave when Last sign off is the only value, but that's how I want the table to look - extra columns just to fix the color coding would make it busy and confuse my report consumers.

hmuzzy_3-1623279660856.png

 

This makes no sense, what am I missing? Please help, thank you!

 

Status: New
Comments
v-lili6-msft
Community Support

hi

Could you please share your sample pbix file for us have a test, that will be a great help.

 

Regards,

Lin

hmuzzy
Regular Visitor

Hi Lin,

 

I don't see an option to attach the file.

Hopefully you can access it through this google drive link: https://drive.google.com/file/d/1rFb6grQunArJX3inBa_k8m-eCLqgTohp/view?usp=sharing

 

Thanks  for your help!

v-lili6-msft
Community Support

hi

after have a test on your sample pbix file, the problem is that you are using 'Show items with no data' in this matrix to let first row show in this visual.

But actually this row has no Values, so conditional format won't work in this row.

 

and after you drag any measure/column in Values which make this row have value, then conditional format will work on all the rows which have value for any category(row context).

 

so for your case, try this way, add measure[ConditionalFormatting] in the matrix,

finally, reduce the width of this measure so that it hides in this visual.

5.JPG6.JPG

 

Note: disable word wrap in Format-> column headers

 

 

Regards,

Lin

hmuzzy
Regular Visitor

Noted. Thank you kindly 🙂