Forum Discussion

winterbloom's avatar
winterbloom
Frequent Visitor
3 years ago

Conditional formatting stops when adding measure

Hi all,

 

I have a weird issue I hope you can help me with.

 

Background info: I am attempting to set up an Income Statement using this method: 

https://www.youtube.com/watch?v=J4317R5BvsA

 

I have added my report structure via a connected Excel file. I want to add conditional formatting to highlight certain rows, if they are headings or subtotal. To do that, I have a column in excel "Highlight" that is 1 if it should be formatted or 0 if not.


I set up my conditional formatting like this:

The same rule for font colour. It works perfectly.

 

HOWEVER, when I go to add a measure to the table, the formatting disappears:

The measure is a SWITCH statement, if that has any relevance.

 

I can still see the conditional formatting rules, but they are obviously not applying.

 

Any assistance appreciated. Thank you. 

3 Replies

  • winterbloom , That is strange.

    If the highlight is a column create a measure like the one below and use that in conditional formatting using the field value option

     

    If(round(max(Table[highlight]),0) =1, "Blue", "white")

  • winterbloom's avatar
    winterbloom
    Frequent Visitor

    amitchandak 

    Actually, I got ahead of myself. I just applied conditional formatting to the Note column (background if text = Blue) and it works:

     

    However, as soon as I remove the Colour measure from the visual, the formatting disappears.

     

    Very frustrating.