Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers!
Enter the sweepstakes now!Preparing for a certification exam? Ask exam experts all your questions on May 15th. Register now.
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")
Check out the April 2025 Power BI update to learn about new features.
Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
User | Count |
---|---|
74 | |
70 | |
70 | |
45 | |
41 |
User | Count |
---|---|
51 | |
47 | |
32 | |
28 | |
27 |