title: Use formula in custom calculated field in Pivot Table
body: <p>In Excel Pivot table report there is possibility for user intervention by inserting "Calculated Field" so that user can further manipulate the report. This seems like best approach compared to using formula on Pivot table data, outside the Pivot table, for many obvious reasons.</p>
  
  <p>"Calculated Field" dialog, looks like this:</p>
  
  <p><img src="https://i.stack.imgur.com/47kxO.png" alt="enter image description here"></p>
  
  <p>and while it's easy to do calculation between available variables (as shown in screenshot) I can't find how to reference range of values for any of available variables.  </p>
  
  <p>For example, if for some reason I want to center the data in range <code>A1:A100</code> I'd use <code>= A1 - AVERAGE(A1:A100)</code> and fill all rows in regular Excel table. But for Pivot table, if I use "Calculated Field" dialog and add new variable with formula: <code>= 'Actual Sales' - AVERAGE('Actual Sales')</code> I get <code>0</code> as output.  </p>
  
  <p>So my question is how can I reference whole range for 'Actual Sales' variable in "Calculated Field" dialog, so that <code>AVERAGE()</code> will return the average of all targeted cells ?</p>