2 Replies Latest reply on Nov 22, 2013 9:12 AM by jonathan.richman.2

    Create Calculated Field from "Percentage of Total"


      I am able to use the quick calculation Percentage of Total to find the percentages that I need for a measure, which represents the percentage of web traffic to a website based on the visitor's city. That lets me generate a list of cities and percentages of web traffic coming from each. So far so good.


      I also have a column of "expected" percentages. This is a fixed number that we've calculated outside of Tableau.


      What I want to do is compare the two percentages and have this as it's own measure...in other words, a calculated field.


      However, I can't figure out how to create a percentage of total calculation when I go to create a calculated field.


      To confound things a little (maybe), the  percentage of total for visitors is based on a calculated field which adds visitors from one site (and one data source) to visitors from another site (another data source). This measure works fine, but is what I'd look to use in the percentage of total formula.


      Hope this makes sense. Thanks.