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
Nidhi09031992
New Member

Conditional formatting on matrix visual

 Screenshot 2025-11-12 at 7.37.28 PM.png

This is the data i have suppose i creating a matrix now , rows : Group, Metric  .... Column : Account ,,,,values :kpi value , this table is created in bi now issue is i am not able to do conditional formatting on any metric level coz all values coming from kpi value column frombackend . I tried it with simple matrix with backend tableand one with customized table in BI . 

3 REPLIES 3
Olufemi7
Solution Specialist
Solution Specialist

Hello @Nidhi09031992

The reason you can’t apply conditional formatting at the metric level in your matrix is because all values (Target, Actual, Gap, etc.) are stored in a single KPI value column. Power BI treats them as one field, so formatting rules can only be applied to the field as a whole, not to individual metrics.


Workarounds:

  1. Create separate measures for each metric using DAX, for example:

TargetOrder = CALCULATE(SUM('Table'[KPI Value]), 'Table'[Metric] = "Target order")
TotalOrder = CALCULATE(SUM('Table'[KPI Value]), 'Table'[Metric] = "Total order")
GapOrder   = CALCULATE(SUM('Table'[KPI Value]), 'Table'[Metric] = "Gap")

 

  • Reshape the data so each metric is a separate column (Target Order, Total Order, Gap, etc.). This makes conditional formatting straightforward since each column is independent.

  • Advanced option: Use Calculation Groups in Tabular Editor to dynamically switch metrics while controlling formatting logic. 

    Supporting Microsoft Documentation
    Apply Conditional Table Formatting in Power BI 
    “Conditional formatting is only available for values in tables and matrices, not for columns or rows in a matrix.”

     Matrix Visual Format Settings  
    Explains customization options for matrix visuals and confirms that formatting applies to values, not row labels.

    with the current “single KPI column” setup, conditional formatting per metric isn’t possible.

    You’ll need either separate measures or a pivoted data structure to unlock metric‑level formatting.

Nabha-Ahmed
Super User
Super User

Hi,

 

This is a common limitation in Power BI. When all values are in a single column (like KPI Value), conditional formatting cannot directly differentiate metrics because Power BI applies formatting on the aggregated value of the column, not per category inside it.

 

Solutions:

 

1. Create separate Measures for each Metric

 

e.g., Sales KPI, Profit KPI…

 

Add them to the Values section → now conditional formatting can be applied per Measure.

 

 

 

2. Use a Field Value Measure for formatting

 

Create a DAX Measure that returns a color code based on the Metric and KPI value.

 

Apply conditional formatting → Background Color → Field Value → choose this measure.

 

 

 

 

Either approach allows you to conditionally format per metric in a Matrix even when all values come from a s

ingle backend column.

 

 

GeraldGEmerick
Super User
Super User

@Nidhi09031992 A bit hard to decipher the issue you are having. You can create a measure that returns a text color code like "#FF00FF" for example that is based on whatever logic you desire within the DAX code. For example:

Color =
VAR _Metric = SELECTEDVALUE( 'Table'[Metric] )
VAR _Value = SELECTEDVALUE( 'Table'[Value] )
VAR _Return
  SWITCH( TRUE(),
    AND( _Metric = "Gap", _Value > 1000 ), "#FF0000",
    AND( _Metric = "Gap", _Value < 1000 ), "#00FF00",
    AND( _Metric = "Total order", _Value > 3000 ), "00FF00",
    "FFFFFF"
  )
RETURN _Return

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.

Top Solution Authors