3 Replies Latest reply on Nov 23, 2018 12:59 AM by Rtep Prima

    Sum value for each category in defined time period and display top N

    Rtep Prima

      Hi,

       

      Could you help me a bit with dynamic and sorted display of top N elements in each time period? Note that elements can differ across periods (pans).

       

       

      Input

       

      DateClientSales
      02/01/2018A1
      02/01/2018A2
      02/01/2018B3
      02/01/2018B4
      02/01/2018A5
      02/01/2018D6
      02/01/2018C7
      02/01/2018C8
      03/01/2018D9
      03/01/2018G150
      03/01/2018D11
      03/01/2018D12
      03/01/2018B13
      03/01/2018A14
      03/01/2018C15
      03/01/2018D16
      03/01/2018B17
      03/01/2018A18
      04/01/2018A250

       

       

      Output

         

      DateClientSum(Sales)Rank
      02/01/2018C151
      02/01/2018A82
      02/01/2018B73
      03/01/2018D481
      03/01/2018A322
      03/01/2018B303

       

       

      I use

      • context for dates due to size of data source / improved performance (e.g. only 2 and 3 January)
      • context for client to remove outliers (e.g. G is overperformer)
      • filter top N parameter used in top sales by sum of sales within client context (e.g. top 3)

       

       

       

       

      Any idea why my results are different? Do you agree with context / filter reasoning?