Tableau Calculated Fields and LODs 3 — Questions and Answers
Question 1: Which LOD expression is best for computing total sales per customer regardless of the date dimension in the view?
- {FIXED [Customer]: SUM([Sales])} (Correct answer)
- {EXCLUDE [Customer]: SUM([Sales])}
- {INCLUDE [Date]: SUM([Sales])}
- SUM([Sales])
Correct answer: {FIXED [Customer]: SUM([Sales])}
FIXED [Customer] pins the aggregation to the customer level only, ignoring the date dimension.
Question 2: What does an empty-dimension FIXED expression like {FIXED : SUM([Sales])} return?
- The grand total of sales across the whole data source (Correct answer)
- An error
- Sales per row
- Sales per the view's dimension
Correct answer: The grand total of sales across the whole data source
With no dimensions specified, FIXED computes a single grand-total value for the entire data set.
Question 3: Which function returns the running total within a partition and is a table calculation rather than an LOD?
- RUNNING_SUM() (Correct answer)
- {FIXED}
- SUM()
- TOTAL()
Correct answer: RUNNING_SUM()
RUNNING_SUM is a table calculation that accumulates values along the addressing direction.
Question 4: To find how many days between two dates in a calculated field, which function is correct?
- DATEDIFF('day', [Start], [End]) (Correct answer)
- DATEADD('day', [Start], [End])
- DATEPART('day', [End])
- DAY([End]) - DAY([Start])
Correct answer: DATEDIFF('day', [Start], [End])
DATEDIFF returns the difference between two dates in the specified unit.
Question 5: What happens when you place an LOD expression result on the Color shelf in a continuous form?
- It is treated as a measure and can be aggregated (Correct answer)
- It becomes a discrete dimension automatically
- It throws an error
- It cannot be visualized
Correct answer: It is treated as a measure and can be aggregated
An aggregated LOD acts like a measure and can be placed on shelves and aggregated as usual.
Question 6: Which is true about nested LOD expressions?
- An LOD can contain another LOD expression inside it (Correct answer)
- LODs cannot be nested
- Only FIXED can be nested
- Nesting always causes errors
Correct answer: An LOD can contain another LOD expression inside it
Tableau supports nesting LOD expressions, where an inner LOD feeds an outer one.
Question 7: What is the difference between EXCLUDE and FIXED when a context filter is applied?
- Both respect context filters, but EXCLUDE still depends on view dimensions (Correct answer)
- EXCLUDE ignores context, FIXED respects it
- They behave identically
- Neither respects context
Correct answer: Both respect context filters, but EXCLUDE still depends on view dimensions
Both FIXED and EXCLUDE respect context filters; EXCLUDE additionally removes dimensions relative to the current view.
Which LOD expression is best for computing total sales per customer regardless of the date dimension in the view?