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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Matt_W2022
Regular Visitor

Colour/highlight a row based on multiple criteria

Hi, 

 

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

Capture.PNG

 

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

 

Any help is really appreciated. 

1 ACCEPTED SOLUTION
v-yueyunzh-msft
Community Support
Community Support

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 :

vyueyunzhmsft_0-1668652577078.png

(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 :

vyueyunzhmsft_1-1668652666466.png

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

vyueyunzhmsft_2-1668652694577.png

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

vyueyunzhmsft_3-1668652745997.png

(4)The result is as follows:

vyueyunzhmsft_4-1668652772864.png

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

View solution in original post

2 REPLIES 2
v-yueyunzh-msft
Community Support
Community Support

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 :

vyueyunzhmsft_0-1668652577078.png

(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 :

vyueyunzhmsft_1-1668652666466.png

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

vyueyunzhmsft_2-1668652694577.png

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

vyueyunzhmsft_3-1668652745997.png

(4)The result is as follows:

vyueyunzhmsft_4-1668652772864.png

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

Thank you for your help

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.