I'm using QGIS to get some "stats" on a current layer e.g. to determine the number of features of a certain class. That I do by using the Aggregate-Algorithm on the class-attribute with count
on "ID"
. I get a table that shows the number of features per class.
But how could I get another attribute giving me the percentage of the total number of features?
While this is easily done by hand (the number of total features in the layer can be easily determined, then it's just count / total_number), I don't know how to access the total number of features of the layer via an expression.