I have a table with 2 fields, field1 contains site specific data, field2 contains a number which groups the field1:
Field1, Field2 180, 1 203, 1 220, 1 205, 1 160, 2 140, 2 135, 2
I want to sort low to high of field1 grouped by field2.
I then want to take the "rank# of field1 grouped by field 2" SUBTRACT the "median of field1 grouped by field2" and divide the answer by "the total # of points of the field2 group"
I'm looking for some direction, a few ideas or a formula I can use in QGIS field calculator to help solve this problem. Or some idea's on a python script for the advanced python calculator.