Forum Discussion

subhendude's avatar
subhendude
Icon for Microsoft Employee rankMicrosoft Employee
3 years ago
Solved

Highlight 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...
  • v-yalanwu-msft's avatar
    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.