Forum Discussion

shaunguyver's avatar
shaunguyver
Icon for Helper III rankHelper III
7 years ago
Solved

Find summed max in range with corresponding values

I have a data table with the following columns:   - Risk ID (whole number) - Building (text) - Risk Impact (decimal)   The table has multuple entries. Each Risk ID is unique, each Building is n...
  • shaunguyver's avatar
    shaunguyver
    7 years ago

    Thanks Greg - I had to put a 'RETURN' separator between the variables and the calculation to get it work, but now it does.

     

    To be clear for everyone, here is the final result:

     

    Count of Entries =
    VAR __table = SUMMARIZE('Table',[Building],"__RiskImpact",SUM([Risk Impact]))
    VAR __highest = MAXX(__table,[__RiskImpact])
    VAR __building = MAXX(FILTER(__table,[__RiskImpact]=__highest),[Building])
    RETURN
    COUNTX(FILTER(ALL('Table'),[Building] = __building),[Risk ID])