Are you trying to get the variance between your % of totals?
Please make your first first table calculation and add it into the data pane. Then create the second table calculation and also do the same thing.
I have attached an example where I have created a calculations:
% of Total:
SUM([Sales]) / TOTAL(SUM([Sales]))
% Variance Change
(ZN([% of Total]) -
LOOKUP(ZN( [% of Total]), -1))
My second table calculation references the first one. So now when I bring it into the view and select edit table calc, it gives me the option to control the nested table calc:
So now I'm able to tell tableau I want the % of Total to be calculated table down, and I want the % Variance Change to be calculated by table across.
I end up getting this view:
I've attached a workbook for more information.