Gallery
Rows Context (Previous row and next row)
Share
Explore

icon picker
Row Context Managment

Tips:

Easily manage and make calculations with previous and next rows, on any desired order and partition level.
NextRowCategory: This is about next row by first next date, ascending item name, partitioned by category. You need a good unique value column to order. In this case is the combination of date and item because date is too repetitive and item breaks the order (you end with two dead ends, instead of just one).
Visible Row: You can use a simple lookup like NextRowVisible to get previous visible row if you know the order of the table is set to a column and will never change. (Beware of grouping). I think you could use a column “order”, and use buttons to allow sorting by other columns just changing that column “order” value.
RowId is just used to avoid current row. (The
current row id != this row id
conditions helps with at much two duplicated item names.)
Random Order just used to demonstrate formula works independent of view.
You should see a pretty straightforward relation in the next row, calling back the present row as previous row.
image.png

Play now:

ThisTable
1
Category
Subcategory
Item
Date
NextRowCategory
NextRowSubCategory
PreviousRow
Random
Visible Row
NextRowVisible
1
B
BB
Item 7
2020-02-10
Item 8
Item 17
Item 6
0.013
1
Item 13
2
A
AC
Item 13
2020-05-10
Item 14
Item 12
0.021
2
Item 1
3
A
AA
Item 1
2020-02-10
Item 11
Item 11
Item 5
0.045
3
Item 10
4
B
BD
Item 10
2020-03-10
Item 16
Item 9
0.059
4
Item 25
5
C
CA
Item 25
2020-07-10
Item 24
0.093
5
Item 17
6
B
BB
Item 17
2020-05-10
Item 16
0.211
6
Item 21
7
C
CC
Item 21
2010-03-06
Item 22
Item 22
0.251
7
Item 12
8
A
AB
Item 12
2020-05-10
Item 13
Item 11
0.361
8
Item 24
9
C
CA
Item 24
2020-07-10
Item 25
Item 25
Item 23
0.384
9
Item 22
10
C
CC
Item 22
2020-07-10
Item 23
Item 23
Item 21
0.400
10
Item 11
11
A
AA
Item 11
2020-03-10
Item 12
Item 1
0.469
11
Item 9
12
B
BD
Item 9
2020-02-10
Item 10
Item 10
Item 8
0.519
12
Item 8
13
B
BC
Item 8
2020-02-10
Item 9
Item 7
0.550
13
Item 4
14
A
AD
Item 4
2020-01-10
Item 5
Item 5
Item 3
0.635
14
Item 6
15
B
BA
Item 6
2020-02-10
Item 7
Item 16
Item 20
0.646
15
Item 5
16
A
AD
Item 5
2020-01-10
Item 1
Item 14
Item 4
0.653
16
Item 16
17
B
BA
Item 16
2020-05-10
Item 17
Item 10
0.656
17
Item 19
18
B
BD
Item 19
2019-03-06
Item 20
Item 20
Item 18
0.722
18
Item 18
19
B
BC
Item 18
2010-03-06
Item 19
Item 8
0.724
19
Item 14
20
A
AD
Item 14
2020-05-10
Item 15
Item 15
Item 13
0.773
20
Item 2
21
A
AB
Item 2
2020-01-10
Item 3
Item 12
0.876
21
Item 20
22
B
BD
Item 20
2019-03-06
Item 6
Item 9
Item 19
0.954
22
Item 3
23
A
AC
Item 3
2020-01-10
Item 4
Item 13
Item 2
0.959
23
Item 15
24
A
AD
Item 15
2020-05-10
Item 14
0.994
24
Item 23
25
C
CC
Item 23
2020-07-10
Item 24
Item 22
0.994
25
[  ]
There are no rows in this table

Share
 
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.