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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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