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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
PHins3
Regular Visitor

Conditional color by comparison

 

Hello,

 

I was wondering it was possible to create something like the below table in PowerBI (it was created in Qlikview).  The table compares results for different scenarios.  the expression is just 'sum of [Quantity]'.  

For clarity the fields used in the table are:

Scenario ID (dimension)

Year (dimension)

Quantity (fact)

 

PHins3_0-1657530460543.png

 

when a single scenario is filtered the cells for the scenario have a yellow background.  red and green color formatting is then used for the table cells for the other scenarios;  green if the number in the cell is higher than the selected scenario and red if it is a lower value.   This is calculated at year level rather than at a total level as can be seen in the image.  

 

any help?

 

much appreciated

 

PHins

1 REPLY 1
lbendlin
Super User
Super User

generally you have one measure that provides the cell values and another measure that provides the conditional formatting instructions.  You can use FILTERS() to figure out which row in your visual has the focus.

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

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.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.

Top Solution Authors