Forum Discussion

Matt_W2022's avatar
Matt_W2022
Regular Visitor
3 years ago
Solved

Colour/highlight a row based on multiple criteria

Hi, 

 

I need to format the rows to highlight SQEP like in the example below; 

 

Where role is SRO or Programme Manager and Status is Completed then 'green', if status is blank then 'red'. 

 

Any help is really appreciated. 

  • Hi , Matt_W2022 

    According to your description, you want to "Colour/highlight a row based on multiple criteria".

    Here are the steps you can refer to:
    (1)This is my test data :

    (2)We can create a measure :

    Measure = var _role =SELECTEDVALUE('Table'[Role])
    var _status = SELECTEDVALUE('Table'[MPLA Status])
    return
    IF(_role in {"SRO","Programme Manager"} && _status="Completed" , "green", "red")

    (3)Then we can configure the measure on the table field :

    We can click the "fx" icon to configure it:

    If you want to show color in a row, you need to configure the measure for all the fileds:

    (4)The result is as follows:

    Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

     

    Best Regards,

    Aniya Zhang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

2 Replies

  • Hi , Matt_W2022 

    According to your description, you want to "Colour/highlight a row based on multiple criteria".

    Here are the steps you can refer to:
    (1)This is my test data :

    (2)We can create a measure :

    Measure = var _role =SELECTEDVALUE('Table'[Role])
    var _status = SELECTEDVALUE('Table'[MPLA Status])
    return
    IF(_role in {"SRO","Programme Manager"} && _status="Completed" , "green", "red")

    (3)Then we can configure the measure on the table field :

    We can click the "fx" icon to configure it:

    If you want to show color in a row, you need to configure the measure for all the fileds:

    (4)The result is as follows:

    Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

     

    Best Regards,

    Aniya Zhang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly