> ## Documentation Index
> Fetch the complete documentation index at: https://docs.validio.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Distinct Values

> Ensure a column contains only distinct values or matches expected uniqueness.

## Validator overview

The Distinct Values validator ensures a column contains only distinct values or matches expected uniqueness. This validator is useful for ensuring primary key uniqueness, validating composite keys, or monitoring the cardinality of categorical field values over time.

You can configure distinct values validators to monitor the following metrics:

| Metric Options | Description |
| :- | :- |
| Unique Count | Validates the number of unique rows. |
| Unique Percentage | Validates the percentage of unique rows. |

The distinct values validator works similar to the Volume validator configured for the Unique Count or Unique Percentage metrics. For more information, see [Volume](https://docs.validio.io/v10.2/docs/validators/validator-types/volume.md) validators. For an overview of all validator types, see [Validator Types](https://docs.validio.io/v10.2/docs/validators/validator-types.md).

## Metric configuration parameters

| Parameters | Description |
| :- | :- |
| Metric | Select the metric to calculate. See the Metric Options table. |
| Field | Select a source field from a list of available fields with numeric data type. See Field selection. |
| Filter | (Optional) Select from a list of filters or create a new filter to specify which records to include. |
| Window | Select from a list of windows or create a new window to specify how to aggregate the data. |
| Segmentation | (Optional) Apply segmentation to analyze data in separate groups. Default is `Unsegmented`. |

### Field selection

For the distinct value metrics, you have to specify one or several fields. Specifying several fields means field values are concatenated before being counted, which is, for example, useful when validating uniqueness of composite keys.

> [!NOTE]
>
> **Null values**: Validio includes `NULL` values in the counts, unless you apply a `NULL filter` to remove them.
