2 Replies Latest reply on Jan 10, 2017 7:33 AM by Joe Oppelt

    percentage of  current quarter with previous quarter

    Prasanna P

      Hi All,

       

      I am taking ORDER_DATE in  quarterly based for sales.

      When ever we are selecting any quarter (single value selection) , It should get the percentage change of selected quarter with its previous quarter in separate column along with quarter/sum(sales).

       

      PFA for workbook.

       

      Thanks,

      Udaya

        • 2. Re: percentage of  current quarter with previous quarter
          Joe Oppelt

          Three things:

           

          1:  Always state what version your uploaded workbook is.  I think yours is 9.1.  I had to try several versions before I didn't get an upgrade message.  If I just let it upgrade to the version I want, you probably won't be able to see the solution I show you.

           

          2:  I think something is wrong with your workbook.  It opens on any of the upgraded versions, but Tableau bombs out when I open it on 9.1.

           

          3:  I can show you what you need to do, but we'll need to get a file that I can open, and that you will be able to open once I show you what you need to do.

           

          And looking at this in 9.3, here is what I would do:

           

          A:  Don't use a quick filter.  You lose all the other quarters because they get filtered out.  Create a calc that looks something like this:

           

          lookup ( attr(datepart('quarter', [Order Date] )),0)

           

          Using a table calc to filter will still leave all the underlying table rows in the table for the sheet.  User will still be able to select a quarter, and only that quarter will get displayed by the filter, but you'll still be able to access the prior quarter's data for comparison.

           

          B:  Access the prior quarter total using LOOKUP( SUM([Sales]), -1)

           

          With that, you can do the math you need to do.