Forum Discussion

alks_skla_f's avatar
alks_skla_f
Icon for Helper II rankHelper II
1 year ago
Solved

Color shape base on condition

Hello, I created shape:
  

 

LineColor = IF(VALUE('All data with group speciality'[Percentage Difference] > 0), "#0DF305", "#FF0000")

 


My next step was select shape -> Format Shape -> Style -> Fill -> fx -> Format style: field value -> What field should we base this on: LineColor
I am getting this issue:

 

How can I solve this issue, please?

  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi alks_skla_f ,

    I created a situation just like yours.

    Then I think you can change your DAX code.

    LineColor =
    IF (
        VALUE ( 'All data with group speciality'[Percentage Difference] ) > 0,
        "#0DF305",
        "#FF0000"
    )

     

     

    Best Regards

    Yilong Zhou

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

2 Replies

  • hi alks_skla_f ,
    here is a fix that can work.  LineColor = IF('All data with group speciality'[Percentage Difference] > 0, "#0DF305", "#FF0000")😊

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi alks_skla_f ,

    I created a situation just like yours.

    Then I think you can change your DAX code.

    LineColor =
    IF (
        VALUE ( 'All data with group speciality'[Percentage Difference] ) > 0,
        "#0DF305",
        "#FF0000"
    )

     

     

    Best Regards

    Yilong Zhou

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