3 Replies Latest reply on Mar 29, 2018 1:25 PM by Michael Ye

    Dynamic automatic Total

    Ankit Jain

      Hi Friends,

       

      I would need your help to make the dynamic Total calculation. I have attached the sample workbook for reference. Here is my requirement that I do not want to include "Y" in my Total. Means I need to include only "X" and "Z" in the total.

       

      Thanks and regards,

      Ankit Jain

        • 1. Re: Dynamic automatic Total
          Michael Ye

          Ankit,

           

          Make a calculated field and put it in Label pane.

           

          IF FIRST()!=LAST() THEN SUM([Sale])

          ELSE SUM(IF [Product]!='Y' THEN [Sale] END) END

           

          Hope it helps.

           

          Michael Ye

           

          3 of 3 people found this helpful
          • 2. Re: Dynamic automatic Total
            Ankit Jain

            Thanks Michael for the solution. I like the way how you make the calculated field and it's working for me. I would request you to please explain me this analog so that I can use it in future.

             

            Thanks again

            • 3. Re: Dynamic automatic Total
              Michael Ye

              Ankit,

               

              The first part: FIRST()!=LAST() THEN SUM([Sale])

               

              FIRST()!=LAST(). This means there are more than one row, which is this:

               

               

               

              In this case, I only list the SUM(Sales) for each Product ID.

               

              Second line:  ELSE SUM(IF [Product]!='Y' THEN [Sale] END) END

               

              Otherwise, it means only one row, which means grand total. Here, I simply exclude the sales for Product Y. So Grand total only add the sales of X and Z.

               

               

              Is it clear?

               

              Michael Ye

              2 of 2 people found this helpful