Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

Summarize Table by Max Value index

This is the table that I have. I'm trying to make a summary table that only grabs the rows with the largest value index. In this sample data, it would be Index value 9.

 

Thank you!

5 Replies

  • az38's avatar
    az38
    Community Champion

    Hi Anonymous 

    try

    Table = 
    var _maxIndex = CALCULATE(MAX(Table[Index]), ALL(Table))
    RETURN 
    FILTER(Table, Table[Index] = _maxIndex)
    • Anonymous's avatar
      Anonymous
      Not applicable

      az38 

      This worked great for one value, how would I modify this if I have multiple G1ROLL values with Separate index's? 

       

      Here's a picture of what I'm referencing.

      • az38's avatar
        az38
        Community Champion

        Anonymous 

        try

        Table = 
        var _maxIndex = CALCULATE(MAX(Table[Index]), ALLEXCEPT(Table, Table[G1ROLL]))
        RETURN 
        FILTER(Table, Table[Index] = _maxIndex && Table[G1ROLL] = MAX(Table[G1ROLL]))