4 Replies Latest reply on Feb 3, 2017 9:10 AM by Shinichiro Murakami

    Sub-total calculation with hierarchy

    balkis ELOUEJ

      hi every body ,

      i need your help

       

      I  need to change the calculation of  subtotals by including a hierarchy.

      I managed to recalculate the subtotals but roll back in hierarchy it puts me an error message.

      I joins a workbook to explain my need.

       

      To calculate the subtotel , i use this method (If you have another method I would be happy too, more dynamic )

      IF MIN([Region])==MAX([Region]) THEN

          IF MIN([Segment])==MAX([Segment]) THEN

              IF MIN([Product])==MAX([Product]) THEN

                  SUM([Value])/[Segment Total]

              ELSE

                  SUM([Value])/[Region Total]

              END

          ELSE

              SUM([Value])/[Grand Total]

          END

      ELSE

          SUM([Value])/[Grand Total]

      END

       

      Thanks you for your help, it's urgent please