2

I would like to write a sequence of numbers of lines that goes from 1 to 90 and restart on 1 again.

For example

1
2
3
1
2
3
1
2
3
2
  • First of all, your problem is not very clear. You probably need to provide some code example or a screenshot for what you are doing and where you get stuck. It may be better to let others know what you have already tried before you asked it here. What I have understood from this incomplete description is that you want to add a new field filled with row numbers, see this question. To sort based on another feature use Sort and Number plugin.
    – datakeen
    Mar 14, 2020 at 15:27
  • no, i would just like to create a new column where the numbers of lines created go from 1 to 90 and then start from 1 to 90 again Mar 14, 2020 at 15:37

1 Answer 1

7

You may use this expression in your field calculator.

if(  @row_number  % 90=0,90,@row_number  % 90)
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.