Calculating Values

You can perform various calculations and statistical analyses on the values in each column in the Data Browser. You can display the following calculations on values in a column:

You can also perform certain calculations on multiple columns:

For example, the following table is the result of a crosstab performed on the transmaster table in the concomp database. The crosstab compares the transdate column to the empid column, and the values in the table are sums from the invoicetotal column. The resulting crosstab table shows you the total sales for each employee for each day.

An Example of the Crosstab Calculation

The following procedures assume that the Data Browser is open.

To compute values in a column:

  1. In the "Data Browser" window, choose Calculate: Compute...
  2. In the "Compute" dialog box, select the column on which you want to perform computations.
  3. Click the OK button.

    Depending on the data type of the column, the following computations are displayed:

    Count-The number of non-null rows in the column

    Rows-The number of rows in the column

    Minimum-The minimum value in the column

    Maximum-The maximum value in the column

    Sum-The sum of the values in the column

    Average-The average of the values in the column

    Std Dev-The standard deviation of the values in the column

    Variance-The variance in the values in the column

    A column's data type determines which computations are displayed. For example, if you select a column with the TEXT data type, the sum, average, standard deviation, and variance are not computed.

  4. To close the "Calculate" window and return to the "Data Browser" window, double-click the control-menu box, which is located in the upper-left corner of the window.

Compute determines averages, totals, minimums, maximums, standard deviations, and variances for CURRENCY, DOUBLE, REAL, NUMERIC, and INTEGER columns. R:BASE also calculates averages, minimums, and maximums for DATE and TIME data types and minimums and maximums for TEXT data types

To count the number of occurrences of a unique value in a column:

  1. In the "Data Browser" window, choose Calculate: Tally...
  2. In the "Tally" dialog box, select a column.
  3. Click the OK button.

    In the "Tally" window, each unique value is listed with the number of occurrences.

  4. To close the "Tally" window and return to the "Data Browser" window, double-click the control-menu box, which is located in the upper-left corner of the window.

Note: Tally does not work with columns with the NOTE data type.

To group specified columns:

  1. In the "Data Browser" window, choose Calculate: Group...
  2. In the "Group..." dialog box, select a column or columns to group.
  3. Click the OK button.

    In the "Group" window, one row for each unique value in the specified column(s) is displayed.

  4. To close the "Group" window and return to the "Data Browser" window, double-click the control-menu box, which is located in the upper-left corner of the window.

To perform a crosstab calculation:

  1. In the "Data Browser" window, choose Calculate: Crosstab...
  2. In the "Crosstab" dialog box, select the following options:

    Note: Crosstab does not work with columns with the NOTE data type.

  3. Click the OK button.

    In the "Crosstab" window, the results of the crosstab are displayed.

  4. To close the "Crosstab" window and return to the "Data Browser" window, double-click the control-menu box, which is located in the upper-left corner of the window.