Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

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

  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi Anonymous 

    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.

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

    Result is as below.

    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. 

4 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous 

    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.

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

    Result is as below.

    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's avatar
    Greg_Deckler
    Icon for Community Champion rankCommunity Champion

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

    • Anonymous's avatar
      Anonymous
      Not applicable

      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.

  • Hi Rico Zhou!

    Could you please attach the .pbix file? It does not work for me.