Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago

Condition row matrix color

Hi Everyone,

 

i got this code

ColorRow =
    SWITCH(TRUE(),
        Str_CE[Voce]="Product1","#F1F1F1",
        Str_CE[Voce]="Product2","#F1F1F1",
        Str_CE[Voce]="Product3","#F1F1F1",
        "WHITE"
    )

Now when I apply it to the matrix the cells which are Blank() or (I transform the blank in "-") in these 3 Product rows don't change color.

Is there a way to bypass this issue, and all the row become colored?

Thanks

4 Replies

  • Anonymous , Create a measure not column

     

    ColorRow =
    SWITCH(TRUE(),
    Max(Str_CE[Voce])="Product1","#F1F1F1",
    Max(Str_CE[Voce])="Product2","#F1F1F1",
    Max(Str_CE[Voce])="Product3","#F1F1F1",
    "WHITE"
    )

     

    It should work for 0. It will not work for blank

    • Anonymous's avatar
      Anonymous
      Not applicable

      in fact, the values are blank or text "-", is there any way?

      • v-easonf-msft's avatar
        v-easonf-msft
        Community Support

        Hi, Anonymous 

        Can you share sample data to further illustrate?

        Best Regards,
        Community Support Team _ Eason