Types of metrics

The Metric drop-down list in the Group Metric panel contains a number of group metrics from which you can choose.

You can choose from the following types of group metrics in the Metric drop-down list. These metrics correspond to the most commonly used g_functions in Macro Language.

Average The average of the data in the selected Data column for each group. This is similar to using the g_function g_avg. (numeric columns only)
  • If a group contains N/A values, those rows are ignored (i.e., the result is the average of the non-N/A values).
  • If a group contains only N/A values, the result for the group is N/A.
Weighted average The average of the data in the selected Data column for each group, weighted by the Weights column for each group. This is similar to using the g_function g_wavg. (numeric columns only)
  • If, for a particular group, either the Data column or the Weights column contains N/A values, those rows are ignored (i.e., the result for the group is the weighted average for those rows where neither the Data column nor the Weights column is N/A).
  • If there are no such rows, the result for the group is N/A.
Sum The subtotal of the Data column for each group. This is similar to using the g_function g_sum. (numeric columns only)
  • If a group contains N/A values, those rows are ignored (i.e., the result is the sum of the non-N/A values).
  • If a group contains only N/A values, the result for the group is 0.
Sum of squares The sum of squares of the Data column for each group. This is similar to using the g_function g_sumsqr. (numeric columns only)
  • If a group contains N/A values, those rows are ignored (i.e., the result is the sum of squares of the non-N/A values).
  • If a group contains only N/A values, the result for the group is 0.
Product The product of the Data column for each group. This is similar to using the g_function g_prod. (numeric columns only)
  • If a group contains N/A values, those rows are ignored (i.e., the result is the product of the non-N/A values).
  • If a group contains only N/A values, the result for the group is 1.
Maximum value The highest number in the Data column for each group. This is similar to using the g_function g_hi. (numeric columns only)
  • If a group contains N/A values, those rows are ignored (i.e., the result is the highest non-N/A value).
  • If a group contains only N/A values, the result for the group is N/A.
Minimum value The lowest number in the Data column for each group. This is similar to using the g_function g_lo. (numeric columns only)
  • If a group contains N/A values, those rows are ignored (i.e., the result is the lowest non-N/A value).
  • If a group contains only N/A values, the result for the group is N/A.
Median value The median of the Data column for each group. This is similar to using the g_function g_median. (numeric columns only)
  • If a group contains N/A values, those rows are ignored (i.e., the result is the median of the non-N/A values).
  • If there are an even number of values, the median is the average of the two middle values.
  • If a group contains only N/A values, the result for the group is N/A.
Mode value The mode of the Data column for each group. This is similar to using the g_function g_mode. (numeric columns only)
  • If a group contains N/A values, those rows are ignored (i.e., the result is the mode of the non-N/A values).
  • If, for a given group, there is no unique mode, the result is arbitrary.
  • If a group contains only N/A values, the result for the group is N/A.
Standard deviation The standard deviation of the Data column for each group. This is similar to using the g_function g_std (numeric columns only)
  • If a group contains N/A values, those rows are ignored (i.e., the result is the standard deviation of the non-N/A values).
  • If a group contains only N/A values, the result for the group is N/A.
Weighted Standard deviation The standard deviation of the Data column, weighted by the Weights column, for each group. This is similar to using the g_function g_wstd. (numeric columns only)
  • If, for a particular group, either the Data column or the Weights column contains N/A values, those rows are ignored (i.e., the result for the group is the weighted standard deviation for those rows where neither the Data column nor the Weights column is N/A).
  • If there are no such rows, the result for the group is N/A.
Variance The variance of the Data column for each group. This is similar to using the g_function g_var. (numeric columns only)
  • If a group contains N/A values, those rows are ignored (i.e., the result is the variance of the non-N/A values).
  • If a group contains only N/A values, the result for the group is N/A.
Weighted variance The variance of the Data column, weighted by the Weights column, for each group. This is similar to using the g_function g_wvar. (numeric columns only)
  • If, for a particular group, either the Data column or the Weights column contains N/A values, those rows are ignored (i.e., the result for the group is the weighted variance for those rows where neither the Data column nor the Weights column is N/A).
  • If there are no such rows, the result for the group is N/A.
Correlation The correlation between Column A and Column B for each group. This is similar to using the g_function g_cor. (numeric columns only)
  • If, for a particular group, either Column A or Column B contains N/A values, those rows are ignored (i.e., the result for the group is the correlation for those rows where neither Column A nor Column B is N/A).
  • If there aren't at least two such rows in the group, the result is N/A.
Covariance The covariance of Column A and Column B for each group. This is similar to using the g_function g_cov. (numeric columns only)
  • If, for a particular group, either Column A or Column B contains N/A values, those rows are ignored (i.e., the result for the group is the covariance for those rows where neither Column A nor Column B is N/A).
  • If there are no such rows, the result for the group is N/A.
Count The number of rows in each group. This is similar to using the g_function g_cnt.
  • The number of rows includes those with N/A values.
Count of unique values The number of unique values in the Data column for each group. This is similar to using the g_function g_ucnt.
  • If a group contains N/A values, those rows are ignored (i.e., the result is the number of unique non-N/A values).
  • If a group contains only N/A values, the result for the group is 0.
Count of non-N/A values The number of non-N/A values in the Data column for each group. This is similar to using the g_function g_valcnt.
Count of N/A values The number of N/A values in the Data column for each group. This is similar to using the g_function g_nacnt.
Dot product The dot product of Column A and Column B for each group. This is similar to using the g_function g_dot.
  • If, for a particular group, either Column A or Column B contains N/A values, those rows are ignored (i.e., the result for the group is the dot product for those rows where neither Column A nor Column B is N/A).
  • If there are no such rows, the result for the group is 0.
Logical AND Returns a boolean value indicating whether all values in the Data column within a given group are 1 (true). This is similar to using the g_function g_and.
  • The Data column must contain a boolean value (0 or 1).
  • N/A values are ignored (i.e., the result is whether all non-N/A values within a given group are true).
  • If all values for a group are N/A, the result is 1 (true).
Logical OR Returns a boolean value indicating whether any value in the Data column within a given group is 1 (true). This is similar to using the g_function g_or.
  • The Data column must contain a boolean value (0 or 1).
  • N/A values are ignored (i.e., the result is whether any non-N/A values within a given group are true).
  • If all values for a group are N/A, the result is 0 (false).