11 Replies Latest reply on Aug 2, 2018 10:23 AM by Andrew Lines

    Two Calculation Methods

    Andrew Lines

      Hi Everyone

       

      Hope you can help with an issue I'm having with calculations in Tableau. I have sales for two countries over the year.  My First calculation I want to do is a running sum of each country over the months, so a running_sum across.  The second calculation is a variance between the two countries for each month displayed in the total row.  I can get each calculation to work individually but not together.

       

      Thanks Andrew

       

      My raw data is structured like this

       

       

      CountryJanFebMarAprMayJunJulAugSepOctNovDec
      UK503006080900
      US560633022000

       

      What I would like to get to is this.  Running sum across and variance down

       

      CountryJanFebMarAprMayJunJulAugSepOctNovDec
      UK5588814142222313131
      US51111171720232325272727
      Variance0-6-3-9-9-6-9-1-344

      4