0

I'm working with an attribute table whose one of the fields (Id) has several repeated numbers, is there a formula in which I can order these repeated numbers, or something like that, so I can delete them more easily? I am working with QGIS 3.28.4

2 Answers2

4

You can count the order of occurrence of every attribute value using this expression in Field calculator (let's say, you want to count the order for the attribute "Id" and write it in the "order" attribute):

array_find(
    array_agg($id, group_by:="Id"),
    $id
) + 1

The result is:

enter image description here

After that you can select the duplicates with the expression:

"order" > 1

Hope this helps!

Martin
  • 51
  • 4
1

You can create a new virtual field with the condition:

count(id, group_by:= id )

This condition will return a value that is repeated several times. And then search for them using the filter.

Hope this makes it easier to solve the problem

enter image description here

Lilium
  • 1,057
  • 1
  • 6
  • 17
Miwasik
  • 89
  • 5