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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors