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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 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