5 Replies Latest reply: Sep 4, 2017 3:46 PM by Matthew Bowers RSS

    Rank & Aggregation Question

    Matthew Bowers

      I'm trying to calculate a rank from the Rating column that is aggregated over Date, Time and Location fields.

       

      This is my current table where Rank = rank(TOTAL(Rating),0,1)

       

      DateTimeLocationNameRating
      Rank
      2017-06-2513:00LondonMatt1234
      2017-06-2513:00LondonTim1225
      2017-06-2513:00LondonBob1216
      2017-06-2415:00LondonFrank1561
      2017-06-2415:00LondonJim1422
      2017-06-2415:00LondonPat1343

       

      What I need to achieve is:

       

      DateTimeLocationNameRating
      Rank
      2017-06-2513:00LondonMatt1231
      2017-06-2513:00LondonTim1222
      2017-06-2513:00LondonBob1213
      2017-06-2415:00LondonFrank1561
      2017-06-2415:00LondonJim1422
      2017-06-2415:00LondonPat1343

       

      I've tried using rank and aggr but just cannot get it to work.

       

      Any help appreciated.

       

      Thanks