Avoid duplicate values

How can I validate the data entered in a column to avoid duplication? I can’t assign this column as key column because I am already using that assignment

Solved Solved
0 2 385
1 ACCEPTED SOLUTION

Steve
Platinum 4
Platinum 4

In your Valid If expression, use something like this:

ISBLANK(
  FILTER(
    "table",
    AND(
      ([_ROWNUMBER] <> [_THISROW].[_ROWNUMBER]),
      ([unique-column] = [_THISROW].[unique-column])
    )
  )
)

replacing table with the name of the table in which the column value should be unique, and unique-column with the name of the column whose values should be unique.

This expression looks for any rows other than the current one that have the same column value. If there are any, the current row’s column value is a duplicate.

View solution in original post

2 REPLIES 2

Steve
Platinum 4
Platinum 4

In your Valid If expression, use something like this:

ISBLANK(
  FILTER(
    "table",
    AND(
      ([_ROWNUMBER] <> [_THISROW].[_ROWNUMBER]),
      ([unique-column] = [_THISROW].[unique-column])
    )
  )
)

replacing table with the name of the table in which the column value should be unique, and unique-column with the name of the column whose values should be unique.

This expression looks for any rows other than the current one that have the same column value. If there are any, the current row’s column value is a duplicate.

Top Labels in this Space