0

I have a field with names, a string field, and I want to create another one with serial content following the alphabetical order.

I have this:

--------
|Field1|
--------
|  B   |    
--------
|  C   |
--------
|  A   |
--------
|  D   |
--------

And I want to reach this:

-----------------
|Field1| Field2 |
-----------------
|  A   |    1   |
-----------------
|  B   |    2   |
-----------------
|  C   |    3   |
-----------------
|  D   |    4   |
-----------------

How can I reach it using the fiel calculator of QGIS?

Any idea???

1 Answer 1

1

The MMQGIS plugin offers a tool to sort Shapefiles. After sorting is completed, you can add the numerical values using field calculator $rownum operator.

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.