# C1.PivotEngine.PivotField.WeightField

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_PivotEngine_PivotField_WeightField_" data-uid="C1.PivotEngine.PivotField.WeightField*">WeightField Property
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_PivotEngine_PivotField_WeightField_" data-uid="C1.PivotEngine.PivotField.WeightField*"></a>
<h4 id="C1_PivotEngine_PivotField_WeightField" data-uid="C1.PivotEngine.PivotField.WeightField">WeightField</h4>
<div class="markdown level1 summary"><p>Gets or sets the <a class="xref" href="C1.PivotEngine.PivotField.html">PivotField</a> used as a weight for calculating
subtotals on this field.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public PivotField WeightField { get; set; }</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Property WeightField As PivotField</code></pre>
</div>
<h5 id="C1_PivotEngine_PivotField_WeightField_remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>If this property is set to null, all values are assumed to have weight one.</p>
<p>This property allows you to calculate weighted averages and totals. 
For example, if the data contains a 'Quantity' field and a 'Price' field,
you could use the 'Price' field as a value field and the 'Quantity' field as
a weight. The output would contain a weighted average of the data.</p>
</div>
</div>
