Forum Discussion

LABrowne's avatar
LABrowne
Helper II
2 years ago
Solved

Complex colouring rows in a table

Hi there,   I have a bit of a complicated formula that I need help building.   I have a table on Power BI where I need to colour in rows based on (1) Cancelled orders (fill in cell colour red) an...
  • VBLOT's avatar
    2 years ago

    Hello LABrowne,

     

    You have multiple ways of doing so. You can do everything inside a single measure but you can also split in 3.

     

    First is your red line measure, second is your yellow one and the third is your main measure that you will use inside conditionnal formatting using SWITCH() function or IF statement.

     

    I suggest to test them separately at first and then (if you want to not have 3 separate measure) mix the logic inside a big one with VAR RedLine = ... , VAR YellowLine = ... and RETURN IF(condition = X && condition <> Y, RedLine, YellowLine)

    I hope it's clearer.

     

    Vincent BLOT
    Did I answer your question? Mark my post as a solution!