4 Replies Latest reply on Mar 13, 2014 6:52 AM by Matt Lutton

    Difference between current month and previous month data ?

    Biswajeet Sahoo

      Hi All,
      I have data by employee name and month.
      > I want to get data difference by month by employee name(means current month data - previous month data).
      Example: For employee "X" March month data is "1000" which March month data - February month data and February month data is "1500" which is February month data is February month data - January month data
      > And also want to show increase in data by "%" by month for employee "X". In February month what amount increase for employee then calculation will be" (February month data/January month data) - 1"

       

      Can any one help in this requirement if have any idea ?
      Please assist me asap...

      Thanks. 

        • 1. Re: Difference between current month and previous month data ?
          Matt Lutton

          Untitled2.png

          You have access to "Quick Table Calculations" like "Difference" and "Percent Difference".

           

          In this view, created with the sample Superstore extract dataset, I've displayed March and February of 2013 (there is no 2014 in this data set).  I've displayed the sum(Sales) by Customer Segment.  Once I've done that, I can right click on that Sum(Sales) pill and choose "Quick Table Calculation">>"Difference" (or "Percent Difference") and choose how I want that computed (Table Across, and relative to previous in this example).

           

          By default, Tableau does not name these calculations and add them to your data window, but you can do this by choosing "Edit Table Calculation">>"Customize", then the calculated field dialog will appear and you can give the calculation a name (I've called mine "Difference" and "Percent Difference"--the triangle on the pills indicates that they are Table Calculations).

           

          Anyway, I hope this helps.  If not, please post a packaged workbook with some sample data and a mock up of what you are wanting as your end results, and I'm sure we can help you get there.  There are also many resources and threads related to Table Calculations like this on this Forum, and on the Web if you need to study up.  Cheers.

          • 2. Re: Difference between current month and previous month data ?
            Matt Lutton

            Post a sample packaged workbook and I will be happy to take a look.  I would need to see the data.

            • 3. Re: Difference between current month and previous month data ?
              Matt Lutton

              It is in my profile, but this is what I would suggest:

               

              Take a subset of the data, paste into Excel, randomize any sensitive fields, pull that into Tableau as an extract, and create a view that demonstrates the issues you are having.  It may seem like a lot of work, but it becomes good practice when posting to this forum, so you can get a wide range of helpers looking at your workbook.  And with some practice, it only takes a few minutes to do.

              • 4. Re: Difference between current month and previous month data ?
                Matt Lutton

                Again, my email address is in my Forum profile.