Let us have a closer look at directional and non-directional table calculations:
- Navigate to https://public.tableau.com/profile/marleen.meier to locate and download the workbook associated with this chapter.
- Navigate to the Directional/Non-Directional worksheet.
- Create the calculated fields, as shown in the following table:
Name |
Calculation |
Notes |
Lookup |
LOOKUP(SUM([Sales]),-1) |
Notice the -1 included in this calculation. This instructs Tableau to retrieve the value from the previous row. |
Size |
SIZE() |
As Tableau help states, the SIZE function returns the number of rows in the partition. Therefore, as can be seen in the following screenshot, the size equals the total number of rows. |
Window Sum |
WINDOW_SUM(SUM([Sales])) |
The Window sum functions (WINDOW_SUM(expression, [start, end]) can operate either... |