The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi Experts,
I want to do the conditional formatting of negative values as mentioned below. How can I achieve it with icons.
also , please please let me know how to work with numbers or percentages while doing the conditional formatting
Condition | Icon |
Greater than or equal to -100 but less than or equal to -5 | Green Icon |
Greater than -5 but leass than or equal to 0 | Yello icon |
Greater than 0 but less than or equal to 100 | Red Icon |
Hi @adhumal2 ,
You could refer to @speedramps 's suggestions, or set conditional formatting like below
Best Regards,
Zoe Zhi
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi adhumal
Please conisder this solution
Create this measure and drag and drop it to your visual.
the UNICHAR will create the icon for you.
@speedrampsI tweaked the formula, but it still gives me the same result. Sorry but I am quite new to this
Here is the DAX that i used
@speedramps Thank you. I added the measure provided by you but it only gives me the 'red' icons only. Below is the screenshot
Here is the DAX
Hi again adhumal
In my instructions it did say ...
VAR Myvalue = -4 -- substitute this hard code value with your measure and multiply with 100 if a %
but unfortunately you have done this
VAR MYVALUE = [Difference %]
[Difference %] has a percent datatype so 13% will be stored as 0.13
and therefore 0.13 is less than 5
If you tweak it will work.
Try this
MyICON =
VAR MYVALUE = [Difference %]
VAR RESULT =
IF (
MYVALUE > -1
&& MYVALUE <= -0.05,
UNICHAR ( 128994 ),
IF (
MYVALUE > -0.05
&& MYVALUE <= 0,
UNICHAR ( 128993 ),
IF (
MYVALUE > 0
&& MYVALUE <= 100,
UNICHAR ( 128308 ),
BLANK ()
)
)
)
RETURN
RESULT
Did I answer your question? Mark my post as a solution!
Appreciate with a kudos 🙂
Thanks for your reply. I used your formula but its showing me below results still (only red icons appear)
Follow this.
Create a DAX measure for an icon.
Icon = UNICHAR(11044)
Use this measure in your table visual.
Create another measure for conditional formatting.
Color =
VAR MYVALUE = [Difference %]
VAR RESULT =
IF (
MYVALUE > -1
&& MYVALUE <= -0.05,
"green",
IF (
MYVALUE > -0.05
&& MYVALUE <= 0,
"orange",
IF (
MYVALUE > 0
&& MYVALUE <= 100,
"red",
BLANK ()
)
)
)
RETURN
RESULT
Then format the Icon (Font) measure field using the newly created "Color" measure.
Did I answer your question? Mark my post as a solution!
Appreciate with a kudos 🙂
Did I answer your question? Mark my post as a solution!
Appreciate with a kudos 🙂
Refer to this https://exceleratorbi.com.au/conditional-formatting-using-icons-in-power-bi/
Did I answer your question? Mark my post as a solution!
Appreciate with a kudos 🙂
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
123 | |
85 | |
77 | |
55 | |
49 |
User | Count |
---|---|
135 | |
127 | |
78 | |
64 | |
63 |