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
Asked
Active
Viewed 103 times
0
-
Are you just wanting to delete all the duplicates or selected to check first? – ScoGer Mar 15 '23 at 21:25
-
2You should provide more information about 1) how your "repeated numbers" look like initially and 2) how they should look like afterwards. Without more information, no answer is possible. Best post sample data or a screenshot. – Babel Mar 15 '23 at 21:33
-
I just want to delete all the diplicates numbers (that represent repeating points) – Carlos Pastorello Mar 15 '23 at 21:57
-
Sorry, if you don't post an example of how your input looks, you probably won't get an answer or the question even risks to be closed. You can click the edit button to insert further information there – Babel Mar 15 '23 at 22:31
-
So your input is let's say 4577783321 - how should the output look like? 45821? Or 4578321? Or something else? – Babel Mar 15 '23 at 22:32
-
1Does this answer your question? Identifying duplicate attributes in field using QGIS – she_weeds Mar 18 '23 at 00:48
2 Answers
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:
After that you can select the duplicates with the expression:
"order" > 1
Hope this helps!
Martin
- 51
- 4

