Forum Discussion

savulesc's avatar
savulesc
Helper I
4 years ago
Solved

Conditional formatting for specific cells in a matrix

Is it possible to use conditional formatting only for the cells from the red square?

So if the result is >= 50% i want the color to be green and if it is less than 50% to be red.

  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi savulesc ,

    I have created a simple sample, please refer to it to see if it helps you.

     

    Create a measure.

    Measure =
    VAR _1 =
        IF (
            MAX ( 'Table'[subject] ) = "A"
                && (
                    MAX ( 'Table'[ID] ) = "A01"
                        || MAX ( 'Table'[ID] ) = "A02"
                )
                && MAX ( 'Table'[month1] ) >= 0.5,
            "Green",
            IF (
                MAX ( 'Table'[subject] ) = "A"
                    && (
                        MAX ( 'Table'[ID] ) = "A01"
                            || MAX ( 'Table'[ID] ) = "A02"
                    )
                    && MAX ( 'Table'[month1] ) < 0.5,
                "Red",
                BLANK ()
            )
        )
    RETURN
        IF ( _1 = "Green", 0.7, IF ( _1 = "Red", 0.4, BLANK () ) )
    

    Then format the background.

    If I have misunderstood your meaning, please provide your pbix file without privacy information and more details with your desired output.

     

    Best Regards
    Community Support Team _ Polly

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

3 Replies