Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
How to change the color of Number ( SLA ) Green, Amber, Red?
how to change the color of a number when i reached a specific number
For Example
0 - 3 = Green
4-7 = Amber
8 Above = Red
Solved! Go to Solution.
Hi @blockobito ,
You can try this method:
New a measure:
Color =
VAR _numberselected =
SELECTEDVALUE ( 'Table'[Number] )
VAR _AorR =
IF ( _numberselected >= 4 && _numberselected <= 7, "#ffbf00", "Red" )
RETURN
IF ( _numberselected >= 0 && _numberselected <= 3, "Green", _AorR )
Or you can use this method:
New a measure:
Colors =
VAR _num =
SELECTEDVALUE ( 'Table'[Number] )
RETURN
SWITCH (
TRUE (),
_num >= 0
&& _num <= 3, "Green",
_num >= 4
&& _num <= 7, "#ffbf00",
_num >= 8, "Red"
)
And then in the visual of table , you can set the color like this:
Turn on the Font Color, here.
And click the fx:
Select the field value in the format style, base on the measure created before:
The result is:
Is this what you expect?
Hope this helps you.
Here is my PBIX file.
Best Regards,
Community Support Team _Yinliw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @blockobito ,
You can try this method:
New a measure:
Color =
VAR _numberselected =
SELECTEDVALUE ( 'Table'[Number] )
VAR _AorR =
IF ( _numberselected >= 4 && _numberselected <= 7, "#ffbf00", "Red" )
RETURN
IF ( _numberselected >= 0 && _numberselected <= 3, "Green", _AorR )
Or you can use this method:
New a measure:
Colors =
VAR _num =
SELECTEDVALUE ( 'Table'[Number] )
RETURN
SWITCH (
TRUE (),
_num >= 0
&& _num <= 3, "Green",
_num >= 4
&& _num <= 7, "#ffbf00",
_num >= 8, "Red"
)
And then in the visual of table , you can set the color like this:
Turn on the Font Color, here.
And click the fx:
Select the field value in the format style, base on the measure created before:
The result is:
Is this what you expect?
Hope this helps you.
Here is my PBIX file.
Best Regards,
Community Support Team _Yinliw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello i also found a solution by Conditional Formating in the settings tab of the Text/Number of the Visual Pane. Thank You for answering!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
94 | |
80 | |
68 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |