Forum Discussion

MichaelaMul's avatar
MichaelaMul
Helper III
1 year ago
Solved

Conditionally Format to highlight a specific row in Matrix visual

Hi, I was wondering if there way a way to highlight the following green row that highlights the total? Or if there is a way to move the Total to the Top, as it is currently (as a roll-up total). Cur...
  • v-nmadadi-msft's avatar
    1 year ago

    Hi MichaelaMul  ,
    Thanks for reaching out to the Microsoft fabric community forum.

    To highlight only the Braded products row in your matrix visual with a colored background in Power BI, follow these steps using conditional formatting:

    Step 1:
    Create a New Measure (for background color):

    ResponseHighlightColor =
    
    IF(SELECTEDVALUE('YourTable'[Billing Month]) = "Branded Products", "#FFD700", BLANK())



    Replace 'YourTable' with the actual name of the table you're working with in your data model. The color code #FFD700 represents a gold shade, but you can substitute it with any hex color code of your choice to match your desired highlight color.



    Step 2:
    To apply conditional formatting, first select the matrix visual, then click the dropdown arrow next to the column you want to format such as the "Billing Month" column. From the menu, choose "Conditional formatting" and then "Background color." In the dialog that appears, set "Format by" to "Field value" and under "Based on field," select the ResponseHighlightColor measure you previously created. Finally, click "OK" to apply the formatting.


    Here is an example of the above method for my sample data

     



    If you find this post helpful, please mark it as an "Accept as Solution" and consider giving a KUDOS. Feel free to reach out if you need further assistance.
    Thank you