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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Hari77
Regular Visitor

Need to change color of rows in matrix Visual Power BI

I have matrix visual in Power BI. In rows colum business units name are there .In column year values are there. Values column revenue is there . Need to change the background color of Rows column alone.5 rows 5 different colors need to be there.Academy,Community,CTP,Licensing,Report services  needs to be in differen colors but years column needs to be remain same.
Please help me with ideas.

Hari77_0-1733822589858.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Hari77 ,
Thanks for danextian and danextian reply.

Here is a workround you can try
We can't customize the formatting of the matrix row headings in the current Power BI, but we can look for a way to combine them using two visualization objects so that we can achieve the desired effect as much as possible.
First we need to create a matrix, and then use the row headings to use the columns to create a single-column table, we need to pay attention to the order of precedence, which will affect the coverage of the visual object.
Then adjust the appearance and size of the table and the font size of the values to fit the row spacing of the matrix.

vheqmsft_0-1733897118763.png

 


Finally, a custom formatted measure is created and applied to the table visual object and overrides the row headings on the matrix.

Color = 
SWITCH(
    TRUE(),
    SELECTEDVALUE('Table'[Business_Units_Final]) = "Academy","Red",
    SELECTEDVALUE('Table'[Business_Units_Final]) = "Community","Green",
    SELECTEDVALUE('Table'[Business_Units_Final]) = "CTP","Brown",
    SELECTEDVALUE('Table'[Business_Units_Final]) = "Licensing","Blue",
    SELECTEDVALUE('Table'[Business_Units_Final]) = "Report services","Orange"
)

vheqmsft_1-1733897150226.png

vheqmsft_2-1733897163520.png

 

Best regards,
Albert He


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
Anonymous
Not applicable

Hi @Hari77 ,
Thanks for danextian and danextian reply.

Here is a workround you can try
We can't customize the formatting of the matrix row headings in the current Power BI, but we can look for a way to combine them using two visualization objects so that we can achieve the desired effect as much as possible.
First we need to create a matrix, and then use the row headings to use the columns to create a single-column table, we need to pay attention to the order of precedence, which will affect the coverage of the visual object.
Then adjust the appearance and size of the table and the font size of the values to fit the row spacing of the matrix.

vheqmsft_0-1733897118763.png

 


Finally, a custom formatted measure is created and applied to the table visual object and overrides the row headings on the matrix.

Color = 
SWITCH(
    TRUE(),
    SELECTEDVALUE('Table'[Business_Units_Final]) = "Academy","Red",
    SELECTEDVALUE('Table'[Business_Units_Final]) = "Community","Green",
    SELECTEDVALUE('Table'[Business_Units_Final]) = "CTP","Brown",
    SELECTEDVALUE('Table'[Business_Units_Final]) = "Licensing","Blue",
    SELECTEDVALUE('Table'[Business_Units_Final]) = "Report services","Orange"
)

vheqmsft_1-1733897150226.png

vheqmsft_2-1733897163520.png

 

Best regards,
Albert He


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

 

 

govind_021
Super User
Super User

Hey , @Hari77 not sure what exactly you want but you can try this .
Try this measure , modify it according to your data

govind_021_0-1733823500306.png
1 ) Create a measure for conditional formatting
2) Then go to Cell Elements in Visual Formatting
and from there in series selecr "Your Revenue Measure" and apply background conditional formatting
select items as per below screenshot and click ok

govind_021_1-1733823615882.png

If you find it as a solution , so please accept it as a solution

Best Regards,
Govind Sapkade
Data Analyst | Power BI Enthusiast | Microsoft PL 300 Certified Power BI Data Analyst | MS Fabric Enthusiast
🎥Subscribe to my youtube channel for hands on tutorials : Youtube

📊Let’s connect on Linkdin : Linkdin

danextian
Super User
Super User

Hi @Hari77 

It is currently not possible to conditionally format the column or row categories of a matrix viz. Conditional formatting is available only to the values.





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 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.