After my previous question Weighted values of field in QGIS, I successfully adapted the following formula in Expression dialogue
"Value" / (sum("Value") / (count(CASE WHEN "Value" >= 1 THEN +1 END))).
In QGIS in the Attribute Table, there are many fields with values for which I count using this formula.
However, I don't want to repeat all long action and therefore I need to create a function in the Function editor. How can I implement this?