2 Replies Latest reply on Jan 28, 2019 3:50 AM by Michael Gillespie

    How to do the Calculation same like excel in Tableau.

    shekhar kumar

      Hi team,

       

      Recently I found some of the challenges in my reports while migrating it from MS excel to Tableau.

      In excel we can calculate the values like Y4/T4-1 (Inside the cell it self). can we do it in Tableau?

       

       

      And I want to calculate the same in Tableau, like example given below.

      2017(China)-2018(China)/1--- This is the calculation I need in Tableau.

       

      Thanks,

      Shekhar

        • 1. Re: How to do the Calculation same like excel in Tableau.
          Diego Parker

          Hey Shekhar,

           

          Have you tried table calculations?

           

          zz.PNG

           

          This should help you achieve what you need. If does, please make sure to mark the answer as helpful and correct so other users can refer to it.

           

          Best,

          Diego.

          • 2. Re: How to do the Calculation same like excel in Tableau.
            Michael Gillespie

            Well, you can't do cell-level calculations in Tableau.  That's not how Tableau works.  You have to think about columns, not the intersections of columns & rows (or CELLS).

             

            In your example, you need to build a calculation that subtracts the 2018 value from the 2017 value, and Tableau will do that for every row in the view you're looking at.  Building that calculation will require you to be able to identify the column in your data set that contains the 2018 results, and the column that contains the 2017 results.

             

            The calculation you create will be a brand new column in your data.

             

            Why are you dividing the result of that calculation by "1"?