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.
If the value of "name" at index 2 is different from the value of "name"at index 1, then change color of "name" at index 2,
If the value of "name" at index 3 is different from the value of "name"at index 2, then change color of "name" at index 3,
If the value of "name" at index 4 is different from the value of "name"at index 3, then change color of "name" at index 4.
This will be the simple logic. But I don't know how to write it in PBI, Measures language.So if you can help with that, that'd be great.