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
Noura
  • 3,429
  • 3
  • 20
  • 41
Newton Monteiro
  • 328
  • 1
  • 9
  • 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 '20 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 – Newton Monteiro Mar 14 '20 at 15:37

1 Answers1

7

You may use this expression in your field calculator.

if(  @row_number  % 90=0,90,@row_number  % 90)
datakeen
  • 473
  • 3
  • 13