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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.