# Diffferent formula from Row 2 onwards

**URL:** <https://community.glideapps.com/t/diffferent-formula-from-row-2-onwards/75370>\
**Category:** Ask for Help\
**Created:** [August 2, 2024, 12:20am UTC](https://community.glideapps.com/t/diffferent-formula-from-row-2-onwards/75370 "2024-08-02T00:20:40Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [August 2, 2024, 12:58am UTC](https://community.glideapps.com/t/diffferent-formula-from-row-2-onwards/75370/2 "2024-08-02T00:58:05Z")

</div>

- Make sure you record the user’s ID/email.
- Use a query column, filter by user’s ID/email equals to this row \> user’s ID/email.
- Add a rowID column to your table.
- Add a lookup column on top of the query result, pointing to that rowID column, so you get an array of IDs for the same user.
- Add a find element index column, use the lookup result as the base, and look for the current row’s rowID. You will get a 0-based list of index for each user.
- Add a math column, with the formula being: I-1, with I being the index of the current row. This will give you the index of the previous row from the same user.
- Add a query column, use the query from the 2nd step as a base, filter by index equals to this row \> previous row’s index.
- Add a single column to fetch the first “EndBal” from the query above.

Now you got the EndBal from the previous row, you can proceed with calculating other things within your structure.

---

_[View the full topic](https://community.glideapps.com/t/diffferent-formula-from-row-2-onwards/75370)._
