Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.