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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
dmalviya
Frequent Visitor

Table Conditional formating based on text column

Hi All,

 

I have one column named EventResult. The possible values are - Success, Fail & Neutral.

 

I am using simple table to show the values. I want to format Backgrould color of column based on EventResult column.

 

Success = Green Color

 

Fail = Red Color

 

Neutral = Yello

 

How this can be done? Please suggest.

1 ACCEPTED SOLUTION
Zubair_Muhammad
Community Champion
Community Champion

@dmalviya

 

You can use this MEASURE for conditional formatting.

 

See attached file as well

 

Measure =
VAR myEventResult =
    SELECTEDVALUE ( Table1[EventResult] )
RETURN
    SWITCH (
        TRUE (),
        myEventResult = "Success", "#00FDD1",
        myEventResult = "Fail", "#ff2f2f",
        myEventResult = "Neutral", "#ffd62a"
    )

coform.png

View solution in original post

1 REPLY 1
Zubair_Muhammad
Community Champion
Community Champion

@dmalviya

 

You can use this MEASURE for conditional formatting.

 

See attached file as well

 

Measure =
VAR myEventResult =
    SELECTEDVALUE ( Table1[EventResult] )
RETURN
    SWITCH (
        TRUE (),
        myEventResult = "Success", "#00FDD1",
        myEventResult = "Fail", "#ff2f2f",
        myEventResult = "Neutral", "#ffd62a"
    )

coform.png

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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

Top Solution Authors