Forum Discussion
Need help with conditional formatting
- 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.
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.
Thank you for your help.
However, I get this result when I apply your code. Can you help me modify it so that only the first "def" is highlighted, and not the rest?
Keeping in mind that if my data looked like this:
abc
def *
def
ghi *
def *
ghi *
Then I will need all the ones with the * highlighted as they are different from the one above them.