XPAC Reference Guide

Ratio fields

Ratio fields

Previous topic Next topic  

Ratio fields

Previous topic Next topic  

Ratio fields are used to display the ratio of two data fields, ie. one data field divided by the other.

When a Ratio field is selected in the field type window, two fields are displayed in the lower half of the window. The first field is labelled Ratio1 (Numerator) and the second field is labelled Ratio2 (Denominator). Each of these fields can be set by selection from a drop down list. All data fields that have the same activity number as the current Ratio field will be displayed in the drop down lists. The data fields for which you require the ratio should be entered in these fields. Note that the first field will be divided by the second field to calculate the ratio.

Remember that the two data fields used in the calculation of a Ratio field must have the same activity number as the Ratio field.

Lowest level ratios

At the lowest level of the database, a field set to Ratio will display the value of the first data field (Ratio1) in the current record divided by the value of the second data field (Ratio2) in the current record. The Include Zeros option will not have any impact on the Ratio values displayed at the lowest level.

Upper level ratios

When the Include Zeros option is ticked on for the Ratio field, upper level records will display the calculated upper level value of the first data field (Ratio1) divided by the calculated upper level value of the second data field (Ratio2). This is illustrated in the following diagram.

Ratio Fields - Include Zeros

When the Include Zeros option is ticked off for the Ratio field, upper level records will be calculated in a similar way to that described above, except that they will ignore any child records that have a zero value for Ratio1 (Numerator). So, in the previous example, the Ratio1 and Ratio2 values for the last child record are ignored in the upper level record Ratio calculation.

Ratio Fields - Do Not Include Zeros

Wherever a Ratio field is used, the component data fields (ie. Ratio1 and Ratio2) will always be calculated before the Ratio field is calculated.