Previous Row value
Hello,
How to tap into previous row values?
If [CurrentRow] == NULL then [CurrentRow]=[CurrentRow-1]
Like when you double click in Excel to fill empty row values with current value until next one?
thank you
Answers
-
These should help, (but if not can you provide an example of what the data looks like now and what you want it to look like)
1 -
You can use [Current Row - 1] along with the Get cell function to get the value from a given row and col:
You'll need to handle the case where Current row = 1 (I'd do this with an If Then Else) to avoid an error where the Get cell applies to an invalid row:
2 -
Thanks Henry, this is great! Exactly what I was after.
Now … how do I make it to loop through all the empty rows ..
this produces:
This is the Input:
0 -
It looks like you're trying to fill in blank values in the "name" column with the last populated value (which may be from several rows above)?
There's a trick for doing this:
1. In a Transform, create a copy of the Name column (using the "Duplicate" button):
2. In your function, use the copy column in the Get Cell:
This should give you what you need.
2 -
Worked like a charm! Thank you Henry!
0