Skip to content

icon picker
previous row alternative

A table based alternative for previous row
In a database, data is typically stored in tables, and each row in a table represents a unique record or entity. The rows in a table are not necessarily ordered or linked in any particular way, so there may not be a clear concept of a "previous" row for a given record.
In addition, relying on a previous row concept can make it more difficult to insert, update, or delete records in the database, as these operations may require shifting or updating multiple rows in the table.
Instead of relying on a previous row concept, databases typically provide other mechanisms for working with data, such as querying and filtering data based on specific criteria, or using transactional operations (buttons) to ensure data consistency and integrity.
Unlike a spreadsheet, Coda has for good reasons - as you may understand based on the above - not a previousRow() function. There is no need. In the context of interest calculations we apply the function Power() while when we deal with tracking sales, growth etc we use the concept of talking tables (transactional operations) and via buttons and or automations we make sure data remains aligned.

I sorted the table on date to make the view friendlier for the eyes

DB Wood Sales
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Name
theDate
wood
sold
initialStock
progressiveSales
outcome
50 m3 Walnut.
2/27/2023
Walnut.
50
421
50
371
70 m3 Cherry
3/3/2023
Cherry
70
155
70
85
10 m3 Cherry
3/4/2023
Cherry
10
155
80
75
50 m3 Birch
3/14/2023
Birch
50
934
50
884
90 m3 Sycamore
3/17/2023
Sycamore
90
977
90
887
50 m3 Cherry
4/22/2023
Cherry
50
155
130
25
10 m3 Beech
5/22/2023
Beech
10
410
10
400
50 m3 Birch
5/29/2023
Birch
50
934
100
834
50 m3 Padauk
5/31/2023
Padauk
50
916
50
866
70 m3 Oak
7/3/2023
Oak
70
947
70
877
70 m3 Padauk
7/13/2023
Padauk
70
916
120
796
90 m3 Maple
7/15/2023
Maple
90
773
90
683
10 m3 Maple
7/30/2023
Maple
10
773
100
673
50 m3 Oak
10/30/2023
Oak
50
947
120
827
50 m3 Oak
11/9/2023
Oak
50
947
170
777
30 m3 Walnut.
12/30/2023
Walnut.
30
421
80
341
50 m3 Beech
12/31/2023
Beech
50
410
60
350
There are no rows in this table
DB Wood
1
2
3
4
5
6
7
8
9
Name
price
unit
Stock
Birch
$250.00
M3
934
Sycamore
$350.00
M3
977
Maple
$450.00
M3
773
Pearwood
$550.00
M3
629
Beech
$700.00
M3
410
Padauk
$725.00
M3
916
Oak
$760.00
M3
947
Cherry
$780.00
M3
155
Walnut.
$900.00
M3
421
There are no rows in this table


Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.