Forum Discussion

TBStacey's avatar
TBStacey
Helper I
2 years ago
Solved

Conditional Formatting appears to not be working

Hello. I'm trying to apply conditional formatting to a measure in Power BI desktop. I want the background color of the field for percents 81-100 to be green, 50 - 80 to be yellow, and 0-49 to be red....
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi TBStacey ,

    Please try this:

    Measure = 
    SWITCH(
        TRUE(),
        [Percent]>=0.81&&[Percent]<=1,"Green",
        [Percent]>=0.5&&[Percent]<0.81,"Yellow",
        [Percent]>=0&&[Percent]<0.5,"Red"
    )

    and use field value format style.



    Best Regards,
    Gao

    Community Support Team

     

    If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
    If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

    How to get your questions answered quickly --  How to provide sample data in the Power BI Forum