5

I have used the formula from this query Identifying duplicate attributes in field using QGIS:

  count(1, "FieldWithDuplicates") > 1

but it doesn't work in my case, just highlights each value from the column.

What is wrong here?

enter image description here

3
  • 3
    Can you share you data? What if you try this count(1, trim("STRUCTURE_NAMECompany")) > 1?
    – Taras
    Commented Nov 26, 2021 at 15:07
  • It may be related to the conditional formatting, make sure the condition is the full expression count(1,"FieldWithDuplicates") > 1
    – JGH
    Commented Nov 26, 2021 at 18:40
  • @Taras this formula throws 0 in the result and is very slow with execution.
    – Geographos
    Commented Dec 2, 2021 at 16:32

1 Answer 1

1

Use Conditional Formatting (1st screenshot) or Select by expression (2nd screenshot) with this expression (replace value twice by the name of the field where you want to find duplicates).

count (value, group_by:=value) > 1

Conditional formatting enter image description here

Select by expression enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.