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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
NNaj
Helper IV
Helper IV

Highlight one row in a table based on selection from slicer

Hi All, I have the following table:

 

NameFeatureFeature 2

Tesla

14
Apple23
GameStop34
Microsoft45

 

I have a slicer that allows for company selection (but this slicer does not filter the table).

 

I want to highlight the row in the table associated with the selected company. In this case I will need to highlight Apples row.

 

 

I have tried creating a measure that computes a score based on the selected company, and then use conditional formating, but had no luck.

 

Any help is greeatly appreciated, 

 

Thanks

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

Hi @NNaj 

Build a measure as below.

Colormeasure = 
VAR _SELName = VALUES('Name'[Name])
RETURN
IF(ISFILTERED('Name'[Name]),IF(MAX('Table'[Name]) IN _SELName,"Red","Black"),"Black")

Add this measure into Font color in the Conditional formatting by Field Value.

1.png

Here you have three columns, you need to add this measure into all columns in Conditional formatting.

2.png

Result is as below.

3.png

When I select Apple, the Apple row will show Red Font color. If you don't want red color, you can change 'red' to other colors in measure.

For more details about conditional formatting: Use conditional formatting in tables

Currently, we can't use bold in conditional formatting.

Your demand is a good idea, while it is not supported to implement in Power BI currently.
You can vote up this idea for this function:additional font formatting (bold, italic, underline, etc)

Or you can submit a new idea to improve the Power BI.
It is a place for customers provide feedback about Microsoft Office products . What’s more, if a feedback is high voted there by other customers, it will be promising that Microsoft Product Team will take it into consideration when designing the next version in the future.

 

Best Regards,

Rico Zhou

 

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

3 REPLIES 3
v-rzhou-msft
Community Support
Community Support

Hi @NNaj 

Build a measure as below.

Colormeasure = 
VAR _SELName = VALUES('Name'[Name])
RETURN
IF(ISFILTERED('Name'[Name]),IF(MAX('Table'[Name]) IN _SELName,"Red","Black"),"Black")

Add this measure into Font color in the Conditional formatting by Field Value.

1.png

Here you have three columns, you need to add this measure into all columns in Conditional formatting.

2.png

Result is as below.

3.png

When I select Apple, the Apple row will show Red Font color. If you don't want red color, you can change 'red' to other colors in measure.

For more details about conditional formatting: Use conditional formatting in tables

Currently, we can't use bold in conditional formatting.

Your demand is a good idea, while it is not supported to implement in Power BI currently.
You can vote up this idea for this function:additional font formatting (bold, italic, underline, etc)

Or you can submit a new idea to improve the Power BI.
It is a place for customers provide feedback about Microsoft Office products . What’s more, if a feedback is high voted there by other customers, it will be promising that Microsoft Product Team will take it into consideration when designing the next version in the future.

 

Best Regards,

Rico Zhou

 

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

Greg_Deckler
Super User
Super User

@NNaj - I would use a separate, disconnected table for your slicer that way you could grab the MAX from each and compare them


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Can you explain how you would use the max function? I have the list of companies in a separate table so this idea seams viable. thanks.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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