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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

highlight selected values in a table based on slicer selection

HI

 

I have a table:

alexhuhn2019_0-1622628497668.png

I have a measure that links to a slicer based on the users selection

Measure = SELECTEDVALUE('Table'[label])
 
I would like to be able to highlight a different row of the table based on the selection of the slicer
 
Any suggestions

 

1 ACCEPTED SOLUTION
v-xiaotang
Community Support
Community Support

Hi @Anonymous 

Based on your discription, you want to highlight a differenct row when you select a value in slicer. and I've created a sample for you,

-

Steps:

Create another table for slicer, in this table you need to add a column, when you select column label in slicer, then it will change the format of the row according to the relationship between column label and HightLightAnotherRow.

v-xiaotang_0-1622785987501.png

Then, create the measure:

 

conditional format =
var _sel=SELECTEDVALUE('Table (2)'[HighlightAnotherRow])
return
IF(MIN('Table'[label])=_sel,"Yellow")

 

Put the measure into the Background color of Values you want,

v-xiaotang_1-1622785987505.png

v-xiaotang_2-1622785987507.png

Result:

v-xiaotang_3-1622785987508.png

If you want the whole row highlighted, then change the Background color of value also.

v-xiaotang_4-1622785987509.png

Result:

v-xiaotang_5-1622785987510.png

 

Best Regards,

Community Support Team _ Tang

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

View solution in original post

3 REPLIES 3
v-xiaotang
Community Support
Community Support

Hi @Anonymous 

Based on your discription, you want to highlight a differenct row when you select a value in slicer. and I've created a sample for you,

-

Steps:

Create another table for slicer, in this table you need to add a column, when you select column label in slicer, then it will change the format of the row according to the relationship between column label and HightLightAnotherRow.

v-xiaotang_0-1622785987501.png

Then, create the measure:

 

conditional format =
var _sel=SELECTEDVALUE('Table (2)'[HighlightAnotherRow])
return
IF(MIN('Table'[label])=_sel,"Yellow")

 

Put the measure into the Background color of Values you want,

v-xiaotang_1-1622785987505.png

v-xiaotang_2-1622785987507.png

Result:

v-xiaotang_3-1622785987508.png

If you want the whole row highlighted, then change the Background color of value also.

v-xiaotang_4-1622785987509.png

Result:

v-xiaotang_5-1622785987510.png

 

Best Regards,

Community Support Team _ Tang

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

PaulDBrown
Community Champion
Community Champion

If you want the visual to maintain rows but highlight based on the selection in the slicer, you need to create an unrelated table to use as the slicer and the use a measure using SELECTEDVALUE or TREATAS to use in the conditional formatting interface.





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






selimovd
Super User
Super User

Hey @Anonymous ,

 

in general you can change the color with a measure and conditional formatting:

https://docs.microsoft.com/power-bi/create-reports/desktop-conditional-table-formatting#color-based-on-a-calculation

 

I don't know your scenario well. But if you use SELECTEDVALUE, this means that a slicer is involved. Then the other values wouldn't show up. So I'm not sure if that makes sense.

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.