Forum Discussion

russellj's avatar
russellj
Frequent Visitor
2 years ago
Solved

Conditional formatting on a card visual

Hello,   Any idea why conditional formatting in PowerBI is so awkward? It doesn't seem possible to format a card value green if positive and red if negative. I simply can't select the right conditi...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi russellj 

     

    For your question, here is the method I provided:

     

    Create a measure.

     

    color setting = 
        IF(
            SELECTEDVALUE('Table'[Values]) > 0, 
            "Green", 
            IF(
                SELECTEDVALUE('Table'[Values]) < 0, 
                "Red" 
            )
        )

     

    Select the fields you want to add color to.

     

     

     

    Here is the result.

     

     

     

    Regards,

    Nono Chen

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.