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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
ERing
Post Partisan
Post Partisan

Can I add conditional formatting to Matrix with disconnected table?

I have a report that uses the same structure as the example below. I am using a disconnected table and a SWITCH measure to create headers and display values in the Matrix visual.

I've been asked to add conditional formatting to the "Revenue Actual" and "Return on Investment Actual" columns with the following criteria.

 

Revenue Actual: <=$999,999 is Red, = $10,000,000 is Black, >=$10,000,001 is Green

Return on Investment Actual: <=%699 is Red, = %700 is Black, >= %701 is Green

 

I'm not sure where to get started with conditional formatting since all my measures are "built into" the single SWITCH measure.

 

Can anyone provide guidance on how I can accomplish this?


Sample File 


Conditional Formatting Matrix.png

Conditional Formatting Matrix Disconnected Table.png

Conditional Formatting Matrix Switch Measure.png

1 ACCEPTED SOLUTION
rajendraongole1
Super User
Super User

Hi @ERing  - Great! You're using a disconnected table with a SWITCH measure to dynamically display different KPIs in a Matrix visual — this is a smart, flexible setup.

 

Header Format Color =
VAR SelectedMeasure = SELECTEDVALUE(MHeaders[Measure Name])
VAR RevenueValue = [Revenue_Actual]
VAR ROIValue = [ROI Actual]

RETURN
SWITCH (
TRUE(),

SelectedMeasure = "Revenue Actual" && RevenueValue <= 999999, "Red",
SelectedMeasure = "Revenue Actual" && RevenueValue = 10000000, "Black",
SelectedMeasure = "Revenue Actual" && RevenueValue >= 10000001, "Green",

SelectedMeasure = "ROI Actual" && ROIValue <= 699, "Red",
SelectedMeasure = "ROI Actual" && ROIValue = 700, "Black",
SelectedMeasure = "ROI Actual" && ROIValue >= 701, "Green",

BLANK()
)

 

Select your Matrix visual.

Click the dropdown on the "Values" field (which is your Header Measures 01).

Choose Conditional formatting > Font color (or Background color, depending on your preference).

In the dialog, switch to "Field value" instead of using rules.

Choose the new measure Header Format Color as the formatting field.

Apply.





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

Proud to be a Super User!





View solution in original post

2 REPLIES 2
rajendraongole1
Super User
Super User

Hi @ERing  - Great! You're using a disconnected table with a SWITCH measure to dynamically display different KPIs in a Matrix visual — this is a smart, flexible setup.

 

Header Format Color =
VAR SelectedMeasure = SELECTEDVALUE(MHeaders[Measure Name])
VAR RevenueValue = [Revenue_Actual]
VAR ROIValue = [ROI Actual]

RETURN
SWITCH (
TRUE(),

SelectedMeasure = "Revenue Actual" && RevenueValue <= 999999, "Red",
SelectedMeasure = "Revenue Actual" && RevenueValue = 10000000, "Black",
SelectedMeasure = "Revenue Actual" && RevenueValue >= 10000001, "Green",

SelectedMeasure = "ROI Actual" && ROIValue <= 699, "Red",
SelectedMeasure = "ROI Actual" && ROIValue = 700, "Black",
SelectedMeasure = "ROI Actual" && ROIValue >= 701, "Green",

BLANK()
)

 

Select your Matrix visual.

Click the dropdown on the "Values" field (which is your Header Measures 01).

Choose Conditional formatting > Font color (or Background color, depending on your preference).

In the dialog, switch to "Field value" instead of using rules.

Choose the new measure Header Format Color as the formatting field.

Apply.





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

Proud to be a Super User!





@rajendraongole1 Works perfectly! Thank you very much!

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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