cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dripet84
Helper I
Helper I

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 4
amitchandak
Super User
Super User

@dripet84 , 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

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

Hi, @dripet84 

Can you share sample data to further illustrate?

Best Regards,
Community Support Team _ Eason

Helpful resources

Announcements
March 2023 Update3

Power BI March 2023 Update

Find out more about the March 2023 update.

Top Solution Authors