1 Reply Latest reply: Mar 20, 2018 4:50 PM by Manish Kachhia RSS

    Running Total

    Frank Cecconi

      Hello

       

      I need a little help with calculating a running total

       

      Dim1Dim2Dim3Measure1Running total
      ABC1/1/2010buy100100
      ABC2/1/2010buy100200
      ABC3/1/2010sell-50150
      DEF1/1/2010buy150150
      DEF2/1/2010sell-50100
      HIJ1/1/2010buy300300

       

      The running total needs to reset when DIM 1 changes.

       

      thanks for your assistance

        • Re: Running Total
          Manish Kachhia

          Create a Straight Table

          Dimension

          Dim1

          Dim2

          Dim3

           

          Expressions

          SUM(Measure1)

          Aggr(RangeSum(Above(TOTAL SUM(Measure1),0,RowNo())),Dim1,Dim2)

           

          Make sure you sort your straight table by Dim1, Dim2 and Dim3 respectively.

           

          You can also use.

          SUM(Aggr(RangeSum(Above(TOTAL SUM(Measure1),0,RowNo())),Dim1,Dim2))