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

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

1 Answers1

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

Babel
  • 71,072
  • 14
  • 78
  • 208