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

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
Esteemed Contributor III

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
Users online (4,584)