QGIS – Solving Area Percentage Calculation Above 100% Issue

field-calculatorqgis

enter image description hereWhen I use the field calculator it gives me a value above 100 % (Pic. 1, red mark).
As you see in the picture the result is at 100,05 %. At other calculations its even higher, sometimes up to 100,25 %. When I change the command from ($area / sum(area))*100 to (round("$area",5) / round("sum(area)",5))*100 it doesn't change anything.

Best Answer

The issue you are encountering may be laying in the different calculation methods of $area and area($geometry). We do not know how your field "area" was calculated, but to get your accurate percentage, I recommend to either recaluclate the fieldvalue of "area" by using $area or use another method in your new calculation. (Like the one @Babel suggested: ($area / sum($area))*100 or area($geometry) / sum(area($geometry)))*100)

From the docs:

$area Returns the area of the current feature. The area calculated by this function respects both the current project's ellipsoid setting and area unit settings. For example, if an ellipsoid has been set for the project then the calculated area will be ellipsoidal, and if no ellipsoid is set then the calculated area will be planimetric.

area($geometry) Returns the area of a geometry polygon object. Calculations are always planimetric in the Spatial Reference System (SRS) of this geometry, and the units of the returned area will match the units for the SRS. This differs from the calculations performed by the $area function, which will perform ellipsoidal calculations based on the project's ellipsoid and area unit settings.