# Example: calculate the normalized value for a survey metric

The normalized value is calculated using a straightforward linear equation.

## Equation used to calculate the normalized value

```Normalized value = (Input Value - Min value defined in metric) / (Max value defined in metric - Min value defined in metric) * current metric weight / (sum of valid metric weight) * scale_factor```

## Example

Calculate the normalized value for the Please rate the competency of the technician metric. The metric has the following values:

 Input value 3 Minimum value 1 Maximum value 6 Current metric weight 10 Number of responses 6 4 of type=number 1 of type=yes/no 1 of type=string (invalid data type; value cannot be calculated) Valid metric weight of each response 10 Scale factor 10

```Normalized value = (3 - 1) / (6 - 1) * 10 / (10 + 10 + 10 + 10 + 10) * 10 = 0.8```

Several data types are ignored because the values cannot be calculated. These invalid data types include string, date, and datetime.

For reporting purposes, use the Metric Result [asmt_metric_result] table.