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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
tj41901
New Member

formating a matrix based on row and column headers

Dears

Started as a new developer with Power BI. i need to format the matrix based on row and column headers like below : 

either the cell background with color or the font with colored when the row and column header are same . 

please help me with this formating . 

 

previous102030405060
10100     
20 150    
30  200   
40   250  
50    300 
60     350
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @tj41901,

You can set conditional formatting to apply the highlight color if the current row and column have the same values.

Measure =
VAR currRow =
    SELECTEDVALUE ( Table[Row] )
VAR currColumn =
    SELECTEDVALUE ( Table[Column] )
RETURN
    IF ( currRow = currColumn, "Red", "Black" )

Conditional table formatting in Power BI Desktop - Power BI | Microsoft Docs

Power BI Conditional Formatting for Matrix and Table Visuals (mssqltips.com)

Regards,

Xiaoxin Sheng

View solution in original post

2 REPLIES 2
tj41901
New Member

Thanks  alot v-shex-msft

i have used this suggestion and its working . 

Anonymous
Not applicable

Hi @tj41901,

You can set conditional formatting to apply the highlight color if the current row and column have the same values.

Measure =
VAR currRow =
    SELECTEDVALUE ( Table[Row] )
VAR currColumn =
    SELECTEDVALUE ( Table[Column] )
RETURN
    IF ( currRow = currColumn, "Red", "Black" )

Conditional table formatting in Power BI Desktop - Power BI | Microsoft Docs

Power BI Conditional Formatting for Matrix and Table Visuals (mssqltips.com)

Regards,

Xiaoxin Sheng

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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

Top Solution Authors