I'm trying to sort my numerical values in my attribute table but instead of getting 1, 2, 3 I get 1, 10, 100, 100 etc. When searching for a solution here on Stack Exchange, many people with earlier versions just had to update to a later one, 2.18 e.g. However, I still have this problem for my 3.4.4 version. How can I solve this bug?
It sounds like the field's data type is Text. So it's sorting the numbers alphabetically.
Create a new field and populate it using the field calculator with
The new field should sort numerically.
Bear in mind that this will only work for features which do not have any actually text characters in them.