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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
olimilo
Continued Contributor
Continued Contributor

Conditional formatting rule without a ceiling (max) or floor (min) value

 

Is there any way I can set a greater than only rule for a conditional formatting?

1 ACCEPTED SOLUTION
TomMartens
Super User
Super User

Hey,

 

unfortunately it's not possible using the rule based conditional formatting but it can be easily achieved using the field based formatting. For this create a measure like so:

vizAid background = 
var currentValue = CALCULATE(SUM('Fact Sale'[Quantity]))
return
SWITCH(TRUE()
    , currentValue < 115000, "coral"
    , currentvalue >= 115000 && currentValue < 600000 ,"#FFFF00"
    , "lime"
)

As you can see, you can either use named colors or a valid hexcode, this article reflects on the named colors that are supported from Power BI: https://blog.crossjoin.co.uk/2018/08/10/colour-names-supported-in-power-bi-conditional-formatting/

 

To assign the measure to the table or matrix visual (basically you can use this coloring on any visual that supports a "fill color" like bar charts) just follow these two steps:

 

1. Select the background color option from the conditional formatting dialog

image.png

 

2. Choose the measure for the Field value based formatting:

 

image.png

 

Then you get a table / matrix visual that will look this:

image.png

Currently it's not possible to bring the conditional formatting to Total line.

 

Hopefully this is what you are looking for.

 

Regards,

Tom

 



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

TomMartens
Super User
Super User

Hey,

 

unfortunately it's not possible using the rule based conditional formatting but it can be easily achieved using the field based formatting. For this create a measure like so:

vizAid background = 
var currentValue = CALCULATE(SUM('Fact Sale'[Quantity]))
return
SWITCH(TRUE()
    , currentValue < 115000, "coral"
    , currentvalue >= 115000 && currentValue < 600000 ,"#FFFF00"
    , "lime"
)

As you can see, you can either use named colors or a valid hexcode, this article reflects on the named colors that are supported from Power BI: https://blog.crossjoin.co.uk/2018/08/10/colour-names-supported-in-power-bi-conditional-formatting/

 

To assign the measure to the table or matrix visual (basically you can use this coloring on any visual that supports a "fill color" like bar charts) just follow these two steps:

 

1. Select the background color option from the conditional formatting dialog

image.png

 

2. Choose the measure for the Field value based formatting:

 

image.png

 

Then you get a table / matrix visual that will look this:

image.png

Currently it's not possible to bring the conditional formatting to Total line.

 

Hopefully this is what you are looking for.

 

Regards,

Tom

 



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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