Complete the code to specify the scope of the table calculation to the entire table.
WINDOW_SUM(SUM([Sales]), [1])The correct syntax to specify the scope from the first to the last row is 0, LAST(). This tells Tableau to compute the sum over the entire table.
Complete the code to set the partitioning of the table calculation by the [Region] field.
WINDOW_AVG(SUM([Profit])) [1] [Region]In Tableau, PARTITION BY is used to define the scope or partition for table calculations, such as by [Region].
Fix the error in the table calculation to correctly compute the running total across [Category].
RUNNING_SUM(SUM([Sales])) OVER ([1])For running totals, you need to order the data by the field, so ORDER BY [Category] is correct.
Fill both blanks to calculate the percent of total sales within each [Region] partition.
SUM([Sales]) / WINDOW_SUM(SUM([Sales]) [1] [2])
The calculation partitions by [Region] and sums over the full window from the first to last row (0, LAST()) to get the total sales per region.
Fill all three blanks to compute the difference from the previous row in [Sales] ordered by [Date] within each [Category].
SUM([Sales]) - LOOKUP(SUM([Sales]), [1]) [2] [Date] [3] [Category]
The LOOKUP function uses offset -1 to get the previous row. The calculation orders by [Date] and partitions by [Category] to compute the difference correctly.