Trying to make a Condition?

hey i have something i want to figure out
i have
Integers representing these stats

  1. Total amount
  2. Amount per row
  3. What index im on

so i want to make a branch with a condition that only goes true if i am on the first index of each row.
but i cant just do one for each row because the amount of rows might change later so how would i go about doing something lie that?

Made this which does the work but it seems kinda excessive