This post is a quick guide to the FIRST, INDEX and LAST functions in Tableau. These functions are advanced table calculations that you can use for many different things!
FIRST()
This table calculation gives you the number of rows from the current row to the first row. The first row is 0 and the second is -1, the third is -2 and so on...
INDEX()
The index function will tell you the index of the current row. The indexes are assigned in consequential order with the first row having an index of 1, the second having an index of 2 and so on...
You can see an example of this here:
LAST()
The LAST function gives you the number of rows from the current row to the last row. The last row is 0 and the penultimate is 1. This index will be computed along the partition in descending order from the first row.