Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
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)
A | B | C | D | E |
XX | 1 | 50 | 1.2 | XX |
XX | 3.8 | 45.41 | 0.73 | XX |
XX | 3 | 42.71 | 0.28 | XX |
XX | 3 | 66.49 | 0.66 | XX |
XX | 3 | 45.5 | 0.38 | XX |
XX | 3 | 69.95 | 0.28 | XX |
XX | 2 | 45.4 | 0.27 | XX |
XX | 8 | 43.17 | 0.45 | XX |
XX | 5 | 38.13 | 0.53 | XX |
XX | 4.4 | 43.06 | 0.42 | XX |
XX | 5 | 42.78 | 0.33 | XX |
Is this something feasible in PowerBI please? Many thanks!!!!!
Solved! Go to Solution.
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.
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!
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")
User | Count |
---|---|
123 | |
69 | |
67 | |
58 | |
52 |
User | Count |
---|---|
183 | |
92 | |
67 | |
62 | |
53 |