BigData / Tableau Interview Questions
What is a Level of Detail (LOD) expression?
An LOD expression lets you compute an aggregation at a level of detail that's different from the granularity of the view itself — something neither a normal calculated field nor a table calculation can do on their own.
{ FIXED [Customer ID] : SUM([Sales]) } { INCLUDE [Order ID] : SUM([Profit]) } { EXCLUDE [Sub-Category] : AVG([Discount]) }
- FIXED: computes the aggregation at exactly the dimensions listed, ignoring whatever's in the view.
- INCLUDE: computes at a finer level than the view by adding extra dimensions, useful inside calculations that need row-level detail temporarily.
- EXCLUDE: computes at a coarser level than the view by removing dimensions the view would otherwise use.
A classic example is "total sales per customer, shown alongside order-level rows" — a normal SUM([Sales]) would just repeat the order's own value, but { FIXED [Customer ID] : SUM([Sales]) } computes the true customer-level total and repeats that same total across every one of that customer's orders, regardless of how granular the view is.
More Related questions...