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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register 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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.