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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Sept PBI Carousel

Power BI Monthly Update - September 2024

Check out the September 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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