Forum Discussion
Anonymous
3 years agoNot applicable
undefined
Hi Team, We need to change Matrix cell color based on the other column cell value. apply different color coding for back and forth cells in each row considering single cell value as threshold in p...
- Anonymous3 years ago
Hi Anonymous ,
I created some data:
Here are the steps you can follow:
1. In Power query. Add Column – Index Column – From 1.
2. Create calculated column.
IF = var _mod= MOD('Table'[Index],3) return IF(_mod=1,1,0)Group_Index = SUMX(FILTER(ALL('Table'),'Table'[Index]<=EARLIER('Table'[Index])),[IF])Rank = RANKX(FILTER(ALL('Table'),'Table'[Group_Index]=EARLIER('Table'[Group_Index])),[Index],,ASC)3. Create measure.
Color = var _index= SUMX(FILTER(ALLSELECTED('Table'),'Table'[Group_Index]=MAX('Table'[Group_Index])&&[Measure]=-5),[Rank]) return IF( MAX('Table'[Rank])<_index,"red","green")4. Value -- Conditional formatting – Background color.
5. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Anonymous
3 years agoNot applicable
Hi Anonymous ,
I created some data:
Here are the steps you can follow:
1. In Power query. Add Column – Index Column – From 1.
2. Create calculated column.
IF =
var _mod=
MOD('Table'[Index],3)
return
IF(_mod=1,1,0)Group_Index =
SUMX(FILTER(ALL('Table'),'Table'[Index]<=EARLIER('Table'[Index])),[IF])Rank =
RANKX(FILTER(ALL('Table'),'Table'[Group_Index]=EARLIER('Table'[Group_Index])),[Index],,ASC)
3. Create measure.
Color =
var _index=
SUMX(FILTER(ALLSELECTED('Table'),'Table'[Group_Index]=MAX('Table'[Group_Index])&&[Measure]=-5),[Rank])
return
IF(
MAX('Table'[Rank])<_index,"red","green")
4. Value -- Conditional formatting – Background color.
5. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly