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
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
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