I'm using QGIS and I need an expression to change an attribute each X number of rows. For instance I have the next attribute data:
I want to create an attribute (C) that assigns an ordered value each 3 rows. With the next result:
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It only takes a minute to sign up.
Sign up to join this communityAssuming your rows are already sorted, you just have to create a new integer field with the expression: ($rownum + 1) / 3