1 Reply Latest reply on Jul 26, 2013 11:18 AM by Daniel VanderMeer

    Using a calculated field to find the percentage of total

    Dan Skorski

      I'm have two data sets that I need to compare, but they have vastly different units.  I would like to calculate a percentage of total value for each of the data sets by state and then graph the difference between these two percentages.

       

      For example:

      Data set 1:

      StateValue

      Normalized

      NY100.25
      NJ100.25
      PA200.5

       

      Data set 2:

      StateValue

      Normalized

      NY15000.5
      NJ10000.33
      PA5000.16

       

      I would like to plot:

      Final Calculation:

      State

      Final Calculation

      NY0.25-0.5
      NJ0.25-0.33
      PA0.5-0.16

       

      Is there some way to do this calculation across data sets?  This seems pretty easy to do in excel so Tableau must have a simple solution...

       

      Thanks in advance for any help,

      -Dan