
1. Re: Table calculation across multiple measures
Tharashasank Davuluru Apr 6, 2016 4:36 AM (in response to Daniel Safai) 
2. Re: Table calculation across multiple measures
Andrew Watson Apr 6, 2016 4:42 AM (in response to Daniel Safai)You're trying to do one of those things that seem like they should be simple but they're not. First I suggest reshaping your data. Depending on your version of Tableau this is possible to do in Tableau.
Edit your data source and select the 3 Value X columns and Pivot these
From there it's simple to produce your initial table:
However the YoY calc as one column is more complex. Tableau will create your Percent Difference calculation for you doing a Quick Table Calculation. Adding this gets you part way to where you want to be:
Creating a flat table with 3 headers, 2015, 2016 and YoY is more complex and will require creating calculated fields.
Create a field called 2015 with this formula: if [Year] = '2015' then [Pivot field values] END
Do the same for 2016. Use these fields to create the Yoy calc SUM([2016])/SUM([2015])  1. Then you can put it together and get the following:

3. Re: Table calculation across multiple measures
Daniel Safai Apr 6, 2016 6:25 AM (in response to Andrew Watson)Hi Andrew,
Thank you so much for your quick answer. However, I forgot to mention that I want to do this without reshaping my data as i need the varibles for some other calculations.
Your anwer was totally correct given my explanation, but do you by any chance know how to do the exact same thing without reshaping the data?
Kind regards,
Daniel

4. Re: Table calculation across multiple measures
Andrew Watson Apr 6, 2016 7:26 AM (in response to Daniel Safai)You could reshape and then recreate your fields Value A, B & C. This formula would recreate Value A:
IF [Pivot field names] = 'Value A' THEN [Pivot field values] END