# Computing Summary Metrics in Insight

Summary metrics are defined in multiple places within Insight, such as charts, tables, and maps.  The method for defining these summaries is consistent and is explained below.

The dialog typically looks like the following at the outset.  When first creating an Insight object such as a chart or table, it will be empty.  For existing metrics, as in the example below, you will have access to options for each metric:

• Re-order the metrics by dragging and dropping them.
• Delete a metric using the icon.
• Edit the display settings for the metric using the icon.  See the document https://support.lityxiq.com/821226-Display-Settings-for-Charts-and-Graphs for more information.
• Edit the metric using the icon. Click this button to create a summary metric.  The ‘Edit Summary Metric’ dialog appears: • Variable  - Select the variable on which to base the summary.  For example, to compute the average response in the dataset, select Response.
• Summary Function - Select the function used to compute the summary (see example below).  Most are self-explanatory, but others are explained here.  Not all summary functions are available for all variables.
• Count All- this summary function will return the total number of records matching the aggregation criteria.  The Variable selected above has no relevance if the Count All function is selected; only the aggregation variables matter.
• Count Non Null - this function will count the valid, non-null values of the selected variable.
• Null Count - this summary function will return the total number of missing values for the selected Variable.
• Minimum and Maximum - in the case of non-numeric fields, these functions will return the alphabetically ordered first and last values (respectively) of the selected Variable.
• Weighted Average - this summary function will return the average of the selected Variable, weighted by the Variable selected in the Weight Variable box.
• Correlation Coefficient - this summary function will return the standard Pearson correlation coefficient of the selected Variable, with the selected Weight variable.
• Weight Variable - If the ‘Summary Function’ selected is ‘Weighted Average’ or 'Correlation', the ‘Weight Variable’ selection will be available.  A list of the numeric fields in the dataset are shown.  Select the variable to use as the weighting factor in computing the average.
• Label - Enter the name to be given to the computed summary.  This should be unique relative to other summaries being computed.  If  you do not enter a name, an appropriate one will be created.

Click this button to add a new summary based on a formula involving other summary metrics. • Formula - In the formula field, enter a mathematical formula for the calculation.  When including the name of an already defined summary metric, enclose it in square brackets.  For example, the formula 100*[Response Rate] will turn a response rate into a percentage.
• Label - Provide a name for the new summary calculation.

When finished, click Save to save changes, or click Cancel to exit without saving work.

#### Other Articles 