2 Replies Latest reply on Oct 16, 2018 2:23 AM by Kalyan Reddy

    Creating a calculation with restart point for Running Total

    Kalyan Reddy

      Dear All,

      I am trying to create a calculated filed for running total with restart point at every year. We can you achieve this using secondary calculation but our requirement is to create calculate filed for this so that it can be used in another calculation. Please find the attached workbook which is having desired result of calculation "Running Sales Total" with secondary calculation . Please let me know if you have any queries.

      Thanks,

      Kalyan

        • 1. Re: Creating a calculation with restart point for Running Total
          Andrew Bickert

          Hi Kalyan,

           

          Are you wanting to force the table calculation parameters within a calculation as show below?

          If so, I do not believe that is possible. You still are able to use the formula within another calculation though. With your new calculation that references Running Sales, you can choose how you want each aspect of the table calculation (even nested table calculations) to behave for the end result you are trying to achieve.

           

          For example, if I use your running sales calculation within a new calculation I create which is also a table calculation, I can then choose how the table calculations interact on a nested basis.

           

          Andrew

          • 2. Re: Creating a calculation with restart point for Running Total
            Kalyan Reddy

            Hi Andrew,

            Thanks for looking into this issue , I found a workaround for this issue . I have used below formula to get the desired result.

            Please let me know if you have any queries.

             

            Running Total:

            IF ATTR(DATEPART('month',[Order Date]))=1

            then SUM([Sales]) ELSE (SUM([Sales])+PREVIOUS_VALUE(0)) END

             

            Thanks,

            Kalyan.