AnsweredAssumed Answered

fill number-column with incremental values, for each set of values in another column.

Question asked by SBB_PUBL on Sep 29, 2020
Latest reply on Sep 30, 2020 by SBB_PUBL

I have a dataset with 2 attributes: area & type. Area is different for each polygon. There are only several types, about 20. For each type I need the polygons prioritized by area. So the largest area for type X gets priority 1, second-largest gets 2 etc. Then repeat this for type Q and all the other types. 

This needs to be done in the field-calculator, not by a model or separate python script.

 

I have found a way to do incremental values for the whole dataset, or for a selection in that dataset. This can be found here: How To: Create sequential numbers in a field using Python in the Field Calculator 

Drawback is that I need to select each type by hand, and execute the 'incremental values' field calculation. Is there a way to do it in one go, automatically? 

Outcomes