Forum Discussion
ngct1112
Post Patron
5 years agoMAX value of columns(Conditional Formatting)
Hi all, I am trying find the MAX value of each row from 3 measures(A,B,C) and highlighted them in GREEN. May I know could I use ONE measure to handle this? ID A B C 1 12 52 2 2 ...
jmdublu
1 year agoFrequent Visitor
I think the gist of the request is to have this apply dynamically and broadly, based on whatever column this measure is placed "under." I.e., someting more like:
FormatAll =
var _Darkgreen = " #34A853"
var _A = DISTINCTCOUNT('TableA'[ID])
var _B = DISTINCTCOUNT('TableB'[ID])
var _C = DISTINCTCOUNT('TableC'[ID])
var _list= FILTER({var _A, var _B, var _C},[Value]<>BLANK())
var _max = MAXX(_list,VALUE([Value]))
// pseudo-code example:
var _column = getColumnName(Table)
Return IF(Table[_column] = _max, _Darkgreen)