4 Replies Latest reply on May 29, 2013 5:13 AM by Mark Holtz

    Historical Average

    Chloe Riordan

      Is there a way I can set up my calculation/ data extract so that I can have an updating historical average?  (ie I have a three month average of Jan- March, but when April is over I'd like the average to switch to Feb- Apr...) 

       

      Let me know if I need to provide more information!

        • 1. Re: Historical Average
          Mark Holtz

          Chloe,

           

          Tableau allows you to quickly add a moving average based on a relative number of periods (aka "partitions") prior to your current point.  If you could attach a packaged workbook, we could show you an example.

           

          Or if you're a DIY type of person, you can try checking out this resource from the knowledge base:

          http://kb.tableausoftware.com/articles/knowledgebase/rolling-calculation

          • 2. Re: Historical Average
            Chloe Riordan

            Thanks for getting back to me so quickly!  The link seems to be exactly what I was looking for -  hopefully I can figure it out on my own, but if not I will certainly be loading the packaged workbook!

            • 3. Re: Historical Average
              Kyle Pellum

              I have a similar data set that I am working with but what I am trying to do is create an monthly average based on the history of data I have.  Ultimately I want to show one year of data but have the historical average by month calculated on all the historical years.  I think this is a little more complicated than the simple running average calculation.  Any help you can provide would be greatly appreciated.  Right now I have been able to use the windowavg() calculation but this is only returning the average across the entire history (not historical average by month).  Let me know if you need more information, the data is sensitive so before I create a sample example i want to know if this makes sense.

               

              Thanks

              • 4. Re: Historical Average
                Mark Holtz

                Hi Kyle,

                 

                WINDOW_XYZ functions are table calculations and table calculations can be set to calculate within different partitions of the view. The partitions are created by dimensions (usually blue pills) on the rows or columns shelf. You manipulate the method of calculation by right clicking the pill (it will have a triangle on it to denote that it involves a table calculation) and you can "Edit Calculation" from the pill on the view, or you can set the "default calculation" in the formula editing window (at the top right) when you create/edit the calculated field.

                 

                It's a little difficult to walk you through it (I consider table calculations one of the more complex areas of Tableau) without seeing your data, but perhaps this will be helpful:

                http://onlinehelp.tableausoftware.com/v8.0/pro/online/en-us/calculations_tablecalculations_understanding_addressing.html