Hi,
I am trying to calculate a formula where the current cell is a function of the cell in the previous row. Once that cell is calculated, the cell in the next row can then be calculated. This is in the form of an iterative formula.
For example:
ID Value Formula
1 50000 If first row = 50000
2 50002 = [VALUE:Row-1]+ ID
3 50005 = [VALUE:Row-1]+ ID
This can’t be achieved by a self join because the current cell is dependent on the next cell. It could probably be done using a loop but i was wondering if there was an action for this.
Thanks for your reply, i think my example was too simple! Or maybe the answer is simple but I’m just lacking the creativity.
For my project I am dealing with multiple examples of multi-row formulas. I think at the core of it I need to solve some variation of the below:
a^x + b*y + c+z
Where a,b, and c are in the current row
and x, y, and z are in the previous row
and none of these variables are in the same column (or you could possible solve using a self join)
Example data in file attached. Could you show me how to achieve this in EasyMorph?
I am not sure if this helps your issue, but I just had a problem where I had to use values form the previous (or next) row in calculations. The basic steps I took were: From the original dataset derive two tables. In table 1 enumerate the rows, in table 2 trim out the first row and enumerate. Essentially, you are making row 2 of table 1 row 1 of table 2. Merge the two tables on RowNo and pick your columns to match and what info you want to merge. To reverse it (instead of trimming out the first row) just trim out the last row, enumerate, and modify the RowNo column to RowNo + 1 and do the same thing.