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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
MeTime
New Member

condional formating

I have a Rules with percetage format. So in card it gives a certain percentage value.
I want to apply conditional formatting where if  > 2,4% "Red" and >=2.0% and 2.4% "Yellow", 0% and 0.2%= Green but in Format Visual the options are greyed out. If I apply the below conditions  i dont have 2.6% is Red

 

Please any help

 

MeTime_0-1696391176649.png

 

8 REPLIES 8
audreygerred
Super User
Super User

Hello! Based on what you have in your screenshot, 0 to less than 20% is green, 20% to less than 24% is yellow and 25% to 100% is red, so in this case 2.6% would fall in the green area (also, since the yellow rule has the upper limit as <24% and the red rule is >=25%, anything from 24% to less than 25% won't be colored.

 

  • For green, change .2 to .002 (.2%)
  • For yellow, change .2 to .02 (2%) and. 24 to .024 (2.4%)
  • For red, change .25 to .024 and you can leave the 1 alone as long as you'll never have over 100% as a value. Otherwise, make 1 be 10 just to be on the safe side. 

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





For this scenario you can use dax function, In power bi desktop go to the model view, and then create a new custom measure using DAX.

 

 

Card_Color =
VAR YourValue = [YourPercentageMeasure]

RETURN
SWITCH(
TRUE(),
YourValue > 0.024, "Red",
YourValue >= 0.020 && YourValue <= 0.024, "Yellow",
YourValue >= 0 && YourValue <= 0.002, "Green",
BLANK()
)

Thanks @audreygerred 

 I try a condition 

 

  • For green, change .2 to .002 (.2%)
  • For yellow, change .2 to .02 (2%) and. 24 to .024 (2.4%)
  • For red, change .25 to .024 and you can leave the 1 alone as long as you'll never have over 100% as a value. Otherwise, make 1 be 10 just to be on the safe side. 

but finally this picture

MeTime_0-1696478935926.png

 

MeTime_1-1696478987597.png

2,6 % this is a Total i want a colour a red 

You're welcome!

For green did you want it to be 0.2% (as stated in original post) which is .002, or do you want it to be 2% which would be .02?

If this solved your issue, please mark as solution. 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Hai

@audreygerred 

To condition follow a orginal post but i try a condition color do not match in rules, i want to try your give solution that result all persentase its red colour 

is there any solution? 

 

Thank You

Hello! They're all red because I wrote the answer to match what you originally wrote which was green is 0% to .2% so I advised to use .002. I think you meant for green to be 0% to 2% so it should be .02 on green 🙂





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





MeTime
New Member

Thank You @ChiragGarg2512  but Value its not Match Format

 

MeTime_0-1696395788945.png

please any help

ChiragGarg2512
Super User
Super User

@MeTime , Chnage the format to percentage of the field which is being used for conditional formatting.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.