I am currently trying to write a formula for a calculated field but I'm new to Tableau and have hit a road block.
I have one sheet that monitors what the goal is by county in various state for my company as a percent of market share against our biggest competitor. The other sheet has what our latest numbers show by country and state for us and our biggest competitor. So I want my worksheet to look like the following:
|State||County||Goal||Company A||Company B||CALCULATED FIELD|
|TX||Harris||30%||25%||75%||30% - 25% = 5%|
|Montgomery||25%||30%||70%||25% - 30% = -5%|
|55%||50%||50%||55% - 50% = 5%|
|Katy||80%||85%||15%||80% - 85% = -5%|
I have it setup right now so it shows State, County, Company A/B (as a percent). I inserted the goal from the other sheet by blending the counties and putting a copy of goal as a dimension to move it to the front (is this right???). Now how do I right a formula to subtract goal (measure) from the percent of Company A? Should I structure this differently? I am just trying to create a template that I can use in multiple states and then use to measure by different geographic units like regions within the state or cities. Please, any help is appreciated!!!
How about "[Goal]-[Company A]" ? If it does not work, is there any chance that you upload some sample twbx file?