Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Need help with conditional formatting

Hi all, So I have this table and I want to highlight the first 'def' value because it's different from the one right above. Then I want to highlight the first 'ghi' for the same reason. Is thi...
  • v-frfei-msft's avatar
    7 years ago

    Hi Anonymous ,

     

    One sample for your reference. Please check the following steps as below.

     

    1. Insert an index column in power query.

     

    2. To create a measure as below and set conditional formatting based on the measure.

     

    Measure =
    VAR ind =
        MAX ( Table1[Index] ) + 1
    VAR cal =
        CALCULATE (
            MAX ( Table1[name] ),
            FILTER ( ALL ( Table1 ), Table1[Index] = ind )
        )
    RETURN
        IF ( MAX ( Table1[name] ) = cal && ind <> 2, "#01B8AA", "#000000" )
    

    Pbix as attached.