Forum Discussion
subhendude
Microsoft Employee
3 years agoHighlight rows in a matrix table with a maximum value
I'm using a dataset as shown below. It contains the latency of different components across the locations. I'm using a matrix table with [Component] and [Location] field in Rows and [Latency] i...
- 3 years ago
Hi, subhendude ;
You could create measures as follow:
firstlocation = IF(ISINSCOPE('Location'[Location]), MAX('Data'[Location]), CALCULATE(MAX('Data'[Location]),FILTER('Data', [Latency]=CALCULATE(MAX('Data'[Latency]),ALLEXCEPT('Data','Data'[Component])))))value = IF(ISINSCOPE('Location'[Location]), MAX('Data'[Latency]), CALCULATE(MAX('Data'[Latency]),FILTER(ALL('Data'),[Component]=MAX('Component'[Component]))))condition = VAR _max = CALCULATE ( MAX ( Data[Latency] ), FILTER(ALL('Data'),[Component]=MAX('Component'[Component]))) return IF([value]=_max,1)The final show:
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Jihwan_Kim
Super User
3 years agoHi,
Please try writing a measure like below, and put it into the background color conditional formatting.
Latency measure: =
SUM( Data[Latency] )
Latency max condition: =
VAR _max =
CALCULATE ( MAX ( Data[Latency] ), ALL ( Location[Location] ) )
RETURN
IF ( [Latency measure:] = _max, 1 )
Please check the below pictures and the attached pbix file.
- subhendude3 years ago
Microsoft Employee
Thanks for the solution. It worked except a scenario...
I saw you're using SUM for Latency measure. If I change it to MAX, the rows appeared as yellow highlighted while collapsed.
The behavior I'm looking is to display max of latency while collapsed and highlight the row with the max value while expanded.