正解:D
The LAST() function in Tableau returns the number of rows from the current row to the last row in the partition. When you compute using 'Order Date', it will change the partitioning of the calculation. If
'Consumer' in '2018' is the last row in its partition when computed by 'Order Date', then LAST() will return 0 for that cell.
The LAST() function in Tableau is a table calculation that returns the number of rows from the current row to the last row in the partition. The value of LAST() is 0 for the last row, increases by 1 for each row above the last row, and can be negative for rows below the current row if there are such rows in the partition.
In the provided visualization, LAST() is set to compute using Table (across). Changing the compute mode to use "Order Date" will adjust the partitioning of the data upon which the LAST() function is calculated. Since
"Order Date" is likely to be a unique value per row (assuming each order has a unique date), each row becomes its own partition.
For the Consumer segment of the year 2018, if "Order Date" is unique for each row, then the last row in each partition (in this case, each individual row) will have a LAST() value of 0 because there are no other rows in the partition - it's the last row of its own partition.
Therefore, when you change the compute mode of LAST() to use "Order Date", each cell under the Consumer segment for the year 2018 will have the LAST() value of 0, because each order date creates a partition of one, making every row the last in its partition.