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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
mmrisk
Frequent Visitor

Formatting two Column Headers in a Matrix table

Hi,

 

I have two columns in Matrix view and I would like to change the text color of one of the Column headers.

My columns are Status and Risk:

 

In the matrix below, I'd like Deferred & Overdue be a different color than Low/Medium/High. 

mmrisk_0-1741103863170.png

 

 

Deferred and Overdue are from column Status, while Low/Medium/High are from Risk. 

 

mmrisk_0-1741103258733.png

 

Formatting by Specific Column doesn't work, as the only Series I can select is the Values, not the Columns:

mmrisk_2-1741103642273.png

 

Thanks for your help

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @mmrisk ,

 

Power BI does not currently support individual column header colors and can only set a uniform color for all column headers.

 

But you can try the following workaround by using the measure header to replace the column header of a field.

 

Create the following measures to represent the values under different 'Risks'.

 

Low = CALCULATE( SUM('Table'[Value]), 'Table'[Risk] = "Low")
Medium = CALCULATE( SUM('Table'[Value]), 'Table'[Risk] = "Medium")
High = CALCULATE( SUM('Table'[Value]), 'Table'[Risk] = "High")

 

 

Use these three measures as the value of the matrix.

vdengllimsft_0-1741157453611.png

 

Set the font color for the headers of each of the three measures.

vdengllimsft_1-1741157557338.png

In this way, the 'Status' column header color is black.
And the measure value header replaces the 'Risk' column header, which can be set to a different color.

 

Please see the attaced pbix for referenece.

 

Best Regards,
Dengliang Li

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

4 REPLIES 4
freginier
Super User
Super User

Hey there!

 

You could try using Conditional Formatting with a Measure:

Power BI does not allow direct header formatting, but you can trick it by adding a dummy measure.

Create this DAX formula:

HeaderColor =
SWITCH(
SELECTEDVALUE(YourColumn),
"Deferred", "#FF0000", // Red
"Overdue", "#FF0000", // Red
"Low", "#000000", // Black
"Medium", "#000000", // Black
"High", "#000000", // Black
"#000000" // Default
)

 

Apply this measure to the "Text color" in conditional formatting under the Values section.

 

Hope this helps!

😁😁

Thank you for your help.

 

I couldn't get this to work as the Conditional Formatting  for Font Color ( in Cell Elements) doesn't change the column headers, just the column values. And I couldn't find any other spots where I could add in this measure. In a matrix table, it seems the only place you can use conditional formatting in is the Values (per above) and the table Title.

 

Anonymous
Not applicable

Hi @mmrisk ,

 

Power BI does not currently support individual column header colors and can only set a uniform color for all column headers.

 

But you can try the following workaround by using the measure header to replace the column header of a field.

 

Create the following measures to represent the values under different 'Risks'.

 

Low = CALCULATE( SUM('Table'[Value]), 'Table'[Risk] = "Low")
Medium = CALCULATE( SUM('Table'[Value]), 'Table'[Risk] = "Medium")
High = CALCULATE( SUM('Table'[Value]), 'Table'[Risk] = "High")

 

 

Use these three measures as the value of the matrix.

vdengllimsft_0-1741157453611.png

 

Set the font color for the headers of each of the three measures.

vdengllimsft_1-1741157557338.png

In this way, the 'Status' column header color is black.
And the measure value header replaces the 'Risk' column header, which can be set to a different color.

 

Please see the attaced pbix for referenece.

 

Best Regards,
Dengliang Li

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

Than you very much,

 

This solution works for me.

 

The caveat for other users is that you will need to do additional work to create a Grand Total that sums the individual Low/Medium/High values.

 

Thanks again.

 

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 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.

Top Solution Authors