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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
engingee
Helper I
Helper I

condition font colour personalised rule apply

Hi everyone,

 

I have a table below in Power BI, and I would like to add a font colour (red) according to my conditional formatting rule.

 

The table is something like below, and the condition I would like to apply is: when column B less than 4, OR column C less than 50, OR column D less than 1, the all table's font colout becomes red (except title row)

ABCDE
XX1501.2XX
XX3.845.410.73XX
XX342.710.28XX
XX366.490.66XX
XX345.50.38XX
XX369.950.28XX
XX245.40.27XX
XX843.170.45XX
XX538.130.53XX
XX4.443.060.42XX
XX542.780.33XX

Is this something  feasible in PowerBI please? Many thanks!!!!!

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

yes, you need to write a calculated column or measure (depending on if the result can be influenced by user interaction)  across the entire visual (ALLSELECTED) .  You can use MINX for your test.

 

Your sample date is insufficient - it always satisfies the red color condition.  I changed the first row's B value to 4 to show the difference.

 

See attached.

View solution in original post

5 REPLIES 5
lbendlin
Super User
Super User

yes, you need to write a calculated column or measure (depending on if the result can be influenced by user interaction)  across the entire visual (ALLSELECTED) .  You can use MINX for your test.

 

Your sample date is insufficient - it always satisfies the red color condition.  I changed the first row's B value to 4 to show the difference.

 

See attached.

Hi @lbendlin , thanks for your explanation. I tried the attachement, but the yellow line I marked should be black colour, rather than red according to the rules, isn't it? Thanks!

 

Screenshot 2022-03-02 124554.jpg

 

Not according to the rules you stated.

The table is something like below, and the condition I would like to apply is: when column B less than 4, OR column C less than 50, OR column D less than 1, the all table's font colout becomes red (except title row)

You were talking about the entire table. Looks like what you actually meant was that you want to apply the rule per row?

 

 

Hi @lbendlin yes, you are correct, I did not explain it clearly, actually it should be the entire rows becomes red, sorry about the confusion 

Change the measure definition:

 

FontColor = SWITCH(TRUE(),MIN('Table'[B])<4,"Red",MIN('Table'[C])<50,"Red",MIN('Table'[D])<1,"Red","Black")

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.