The core feature of Timeline is the integration of built-in discrete time as the third dimension of the spreadsheet. Cells can hold history, reference and aggregate their previous values and the user can step through time and observe how cells evolve in real time.
To reference a previous value of a cell, Timeline uses a negative-index-based syntax.
= A2[-1]You can use any expression as the index to reference any previous value of a cell.
= A2[-MAX(B1:B5)]When a cell is referencing its own previous value, it needs to have an initial value to start with. For this purpose, Timeline uses a dual-assignment syntax that allows cells to have up to two formulas seperated by the => symbol.
= 0 => A2[-1] + 1The first formula specifies the cell's value at the first time step, whereas the second formula specifies the cell's value at all subsequent steps. If only one formula is provided, it is used across all time steps.
To create a time-aware cell that references its own previous value, we first need to specify its initial value, then reference its previous value using which we calculate its new value.
= 1 => A1[-1] + 1The above example represents a simple counter, where A1 is initially set to 1 and in all subsequent steps, it increments its previous value by 1. In this way, A1 is calculated to 1, then 2, 3 and so on.
Using the same negative-index-based syntax, we can retrieve a range of previous values of a cell.
= B2[-3:-9]In this example, we a range of historical values of cell B2.
= B2[:-5]We can omit the first index to retrieve a range of previous values starting from the current step backwards.
Apart from time-aware ranges, you can also select a three-dimensional range in space and time. For this purpose, you can use a basic cell range syntax combined with the time indexing syntax.
= B2:C5[-5:-10]The above example retrieves a several snapshots of historical values of the B2:C5 cell range.