2 Replies Latest reply on Dec 30, 2018 7:37 PM by Richa Maheshwari

    How to show the sum of a quarter or a year?

    Richa Maheshwari



      I want to have the flexibility to present a data in terms of month-on-month, quarter-on-quarter and year-on-year. When i do that, i want to see the sum of a quarter over another quarter and likewise for a year.

      However, when i click on the quarter filter, i see the numbers for the quarter according to their respective months. How can i show the summation of the three months according to quarters and 12 months according to years?

      For example,

      April - 1

      May - 4

      June - 9

      Total for the quarter is 14.  When i click on quarter filter and choose a quarter i want to be able to see the total number and not the breakdown.


      In the packaged workbook attached to this post, I am using the superstore data and trying to show profit by segment.


      I am not sure how to approach this problem. Can anyone help me here?


      Thank you.

        • 1. Re: How to show the sum of a quarter or a year?
          Rodrigo Calloni

          Hello Richa


          I was able to show the sum of profit by Quarter by adding a Reference line to the Pane level. As every pane represents a Quarter then Tableau aggregates the months together to get the value.


          The steps are:


          1- Go to the Analytics tab and drag a reference line over the Pane square that shows when you click on the reference line icon


          2- Replace Average with Total for your aggregation


          3- On Label pick the Value for the measure.


          You should be done by then.


          Attached the workbook with this solution.


          I hope this helps


          • 2. Re: How to show the sum of a quarter or a year?
            Richa Maheshwari

            Hi Rodrigo,


            That's a nice tip, thanks for sharing.

            However, it works for either quarter when i use quarter in my order date hierarchy or year when i use year in my order date hierarchy. Never for both since it is on pane selection. I tried table selection and that resulted in the sum of the entire data.


            Can you help me focussing on quarter when quarter is selected and year when year is selected?