_Copying_ values from previous rows

#1

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

#2

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
#3

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

#4

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
#5

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

2 Likes