1 Reply Latest reply on Nov 19, 2018 7:36 AM by Yuriy Fal

    Quick Calculated Columns

    Martin Sellers

      Hello-

      I have a fairly simple question.  I want to create several calculated columns to the right of the current ones and have them based on other columns in my chart.   This is very simple to do in Excel, but seems to be nearly impossible in Tableau. 

       

      New Column 1: Difference between "2018-00-Budget" and "2018-09-ACT"

      New Column 2:  "2018-00-Budget" - ("2018-09-ACT" + "2018-09-ENC")

      New Column 1: Difference between "2018-00-Budget" and "2018-09-EST"

      New Column 2: Difference between "2018-00-Budget" and "2018-06-EST"

       

       

        • 1. Re: Quick Calculated Columns
          Yuriy Fal

          Hi Martin,

           

          The simple way to achieve this in Tableau would be

          using Measure Names (in Columns) & Measure Values (in Text).

           

          For this to work, one could create distinct Measure calculations

          for each of the column on a view, something like this:

          // 2018-00-BUDGET Amt

          SUM( IF [Report Date - Report Name] = '2018-00-BUDGET' THEN [Amount...] END )

          etc. for every value in the [Report Date - Report Name] Dimension.

           

          Then the 'difference' columns would be as simple as the names and signs combined:

          // Difference between 2018-00-Budget Amount and 2018-00-Act Amount

          ZN( [2018-00-BUDGET Amt] ) - ZN( 2018-00-ACT Amt )

           

          Hope it helps.

           

          Yours,

          Yuri