4 Replies Latest reply on May 10, 2017 7:46 AM by Steffem Lerbs

    Running Total result in total Column without using running_total Table Calculation

    Steffem Lerbs

      Good Morning,

       

      i am using Tableau now for a few year and usually find my way around. However this time i would like to ask for your help for the following situation.

       

      i need to show in a simple table the running total of monthly data and show for every quarter the subtotals. the challenge is that the data is already pre calculated in the database as a running total. my figures are now Jan 7000 Feb 8000 Mar 9000 April 100000. I need to "manipulate" the sub totals in a way that it always shows the last month of the quarter with values in it. so the Total for Quarter 1 needs to show 9000 and Quarter 2 shows 10000. it would be nice if also the subtotals for Quarter 3 and Quarter 4 can show the latest month's result which in this scenario would be 10000 as well.

      I read the nice "drawing with numbers" blog about Grand Totals and came up with the following formula:

       

      IF MIN(MONTH([Month])) != MAX(MONTH([Month])) THEN

      SUM(IF MONTH([Month]) = 3 THEN [Performing houses TY] END)

      ELSE SUM([Performing houses TY])

      END

       

      The issue is that the 3 in the second line of my formula is hard-coded and i dont get it to work to be dynamically.

       

      thanks for your help in advance. I know it is better to have a work book attached however i havent found a smart way of doing that as it contains sensitive data for the company i work for.

       

      Steffen Lerbs

       

      Nachricht geändert durch Steffem Lerbs i am adding the workbook. up to line 5 this is what i need to display in the report. All the calculations below are my tries to show the subtotal by quarter which is supposed to be the last months result of performing houses.