15 Replies Latest reply: Jul 2, 2016 7:17 AM by Sunny Talwar RSS

    Top 5 values on straight table

    Alec Harf

      hi all,

       

      I have a straight table in Sense with Date and Sales as shown below. the same column is calculated from other columns and involve the use of above column.

       

      Here is the expression I am using:

       

      ((Sum({$Flag = {'1'}>}[Price]) - above(Sum({$<Flag = {'1'}>}[Price])))  /  ([Date] - above([Date]))

       

      I need to add more calculation and have the measure to show rolling values meaning Aug 16 should show 8.07 +  the above 4.85= 12.92 and Oct 16 = 2.35 +  the above 12.92 = 15.27 and so on.. then I need to do limit data to show top 5 only..

       

      Anyone knows how to do it?

       

      DateSale
      Jul 16-
      Aug 16$4.85
      Sep 16$8.07
      Oct 16$2.35
      Nov 16$1.85
      Dec 16$1.07
      Jan 17$0.35
      Feb 17$0.35
      Mar 17$0.35
      Apr 17($0.43)
      May 17$0.35
      Jun 17($0.43)
      Jul 17$0.35
      Aug 17$0.35
      Sep 17($0.93)