_Copying_ values from previous rows

I’ve got a table where I’d like to pre-fill several cells for each new row (because they infrequently change)

For example:

Thing Setting 1 Setting 2 Observation
Foo 1 a neat!
Bar 1 a meh
Baz 2 a not bad
new row 2 a

In this example, I’d like to have new rows copy values for the settings columns into new rows. Doing this with a formula doesn’t appear to be sufficient (=Table.Last().[Setting 1] would be a self-reference, for example). I also don’t want edits to previous rows to affect their following rows

I figured it out!

Set the default value for Setting 1 to =thistable.[Setting 1].Nth(-2) and likewise for Setting 2 =thistable.[Setting 2].Nth(-2)

1 Like

Perhaps something like Default Value of the column = nth(-1) ?

Similar to what @Dan_Rose suggested, you could also use a combo of Last() and Slice() in the default value of the column using this formula:

=Last(thisTable.[Setting 1].Slice(1,-2))

1 Like

Thanks folks! Both approaches appear to work great :+1:

2 Likes

I have a question around this question if possible
if you wanted tot do the same thing, but here is the difference
can we filter the table by “thing” and find he nth(-2) for only the Foo “things”
and then copy that into the new value

thnx
sach