Calculating Weighted Averages and Sums

There may be cases where it is necessary to find the weighted average or sum of your data. In a weighted average or sum, some data points contribute more to the subtotal than others.

Suppose you have a bound list of products and you want to find the average price for the group of products, taking into account the quantity of each product purchased. You can weight the price average by the number of units purchased. This can be done at run time using the Field Settings dialog box.

To add weight to a calculation at runtime:

  1. Right-click the field in the Values area of the C1OlapPanel and select Field Settings.
  2. Click the Subtotals tab and select the type of subtotal you want to calculate.
  3. In the Weigh by drop-down list, select the field from your data table that will be used as a weight.
  4. Click OK to close the Field Settings dialog box.

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback