Skip to content

LOD Expressions Interview Questions for Tableau

22 LOD Expressions questions with answers for tableau roles — 5 easy, 11 medium, 6 hard.

About LOD Expressions

Level of Detail expressions compute aggregations at a level different from the view using FIXED, INCLUDE and EXCLUDE. Learn cohort analysis, first purchase dates, percent of total, customer frequency and churn flags, and understand how filters and context interact with LODs. This is the most tested advanced topic in Tableau interviews.

Sheet progressStart practicing
3 QUESTIONS FREESign up to unlock the full question bank and track your progress.Unlock every question and answer, then continue practising company-wise and package-wise.
3 questions free Unlock the rest in seconds
01

What are Level of Detail expressions in Tableau?

Save to ▾
Show answer
LOD expressions let you compute an aggregation at a level different from the view. The syntax is curly braces with a keyword, dimensions, a colon and an aggregate, such as {FIXED [Customer] : SUM([Sales])}. They solve problems such as customer-level totals, first purchase dates, and percent of total without changing the view. The three keywords are FIXED, INCLUDE and EXCLUDE.
02

What is the difference between FIXED, INCLUDE and EXCLUDE?

Save to ▾
Show answer
FIXED computes at exactly the listed dimensions, regardless of the view. INCLUDE computes at the view level plus extra dimensions, then re-aggregates, for example average sales per customer per region. EXCLUDE removes dimensions from the view level, for example regional total shown against each state. FIXED ignores dimension filters unless in context, while INCLUDE and EXCLUDE respect them.
03

Write an LOD to find the first order date of each customer.

Save to ▾
Show answer
First Order Date: {FIXED [Customer ID] : MIN([Order Date])} Cohort Year: YEAR({FIXED [Customer ID] : MIN([Order Date])}) Convert Cohort Year to a dimension and place it on Rows with YEAR(Order Date) on Columns to see how each cohort keeps buying over time.
04

Write the general syntax of an LOD expression.

Save to ▾
Show answer
The syntax is {KEYWORD [Dimension1], [Dimension2] : AGGREGATE([Measure])}, where the keyword is FIXED, INCLUDE or EXCLUDE. For example {FIXED [Region] : SUM([Sales])} returns total sales per region on every row. The dimension list can be empty for FIXED to get a table-level value. The aggregation part must always be an aggregate such as SUM, AVG, MIN, MAX or COUNTD.
05

You need to show the percent of customers who ordered more than once. How do you do it?

Save to ▾
Show answer
Create Orders per Customer: {FIXED [Customer ID] : COUNTD([Order ID])}. Summing a row-level 1 or 0 flag would count order lines, not customers, so instead use COUNTD(IF [Orders per Customer] > 1 THEN [Customer ID] END) / COUNTD([Customer ID]). Format as percentage and break it down by region or segment to compare loyalty.
06

What does {FIXED : SUM([Sales])} return?

Save to ▾
Show answer
With no dimension, FIXED computes at the table level, returning grand total sales for the whole data source, after context and data source filters. It is useful for percent of total: SUM([Sales]) / MIN({FIXED : SUM([Sales])}). Since it repeats on every row, wrap it in MIN, MAX or AVG in the view rather than SUM, which would multiply the total.
07

Are LOD expressions dimensions or measures?

Save to ▾
Show answer
FIXED LODs with dimensions return row-level values that can be used as dimensions, for example a customer's first order year used for cohort analysis. Tableau puts them in measures by default when the result is numeric, but you can convert them to dimension. INCLUDE and EXCLUDE results are measures because they depend on the view. Converting FIXED to a dimension is common for bucketing.
08

How are LOD expressions different from table calculations?

Save to ▾
Show answer
LOD expressions are computed in the data source as part of the query, so they can be used as dimensions, in filters and inside other calculations. Table calculations run on the aggregated results already in the view, so they depend on the view layout and addressing. LODs are better for fixed levels such as customer totals, while table calcs suit running totals, ranks and differences.
09

How do you calculate each category's percent of total sales using LOD?

Save to ▾
Show answer
Total Sales: {FIXED : SUM([Sales])} Percent of Total: SUM([Sales]) / MIN([Total Sales]) Place Category on Rows and Percent of Total on Columns, formatted as percentage. Add Region to context filters if the total should respect the region selection.
10

Calculate average sales per customer for each region.

Save to ▾
Show answer
Use INCLUDE to compute at customer level inside each region: AVG({INCLUDE [Customer ID] : SUM([Sales])}) Place Region on Rows. Tableau sums sales per customer within each region, then averages those totals. Without INCLUDE, AVG([Sales]) would give average per order line, which answers a different question.
11

Show each state's sales compared with its region's total.

Save to ▾
Show answer
Region Sales: {EXCLUDE [State] : SUM([Sales])} Share of Region: SUM([Sales]) / SUM([Region Sales]) With Region and State in the view, EXCLUDE removes State so each row shows the regional total. Alternatively {FIXED [Region] : SUM([Sales])} works but ignores dimension filters.
12

Count customers by the number of orders they placed.

Save to ▾
Show answer
Orders per Customer: {FIXED [Customer ID] : COUNTD([Order ID])} Convert it to a dimension and discrete, place it on Columns, and put COUNTD([Customer ID]) on Rows. The chart shows how many customers placed 1, 2, 3 or more orders, a common customer frequency analysis.
13

Your percent of total changes when a user filters Category. The business wants it to stay fixed. What do you do?

Save to ▾
Show answer
If you used a quick table calculation, the total is computed on the filtered view, so it changes. Replace it with a FIXED LOD for the total, which ignores dimension filters, or use EXCLUDE for the filtered dimension. Make sure any filters that should affect the total are added to context. Test with and without filters and document the behaviour.
14

Using FIXED with SUM in the view gives a huge inflated number. Why?

Save to ▾
Show answer
FIXED returns a value repeated on every row at the fixed level. If the view is at a finer level, or at the total level, SUM adds the repeated values, multiplying the result. Use MIN, MAX or AVG to bring back the single value, or make sure the view level matches the FIXED dimensions. This is a frequent mistake when using table-level totals.
15

An interviewer asks you to find the highest-selling product in each category. How do you approach it?

Save to ▾
Show answer
Calculate category max: {FIXED [Category] : MAX({FIXED [Category], [Product Name] : SUM([Sales])})}. Then flag: IF {FIXED [Category], [Product Name] : SUM([Sales])} = [Category Max] THEN 'Top' END and filter to Top. A simpler alternative is a RANK table calculation computed along products within each category, filtering rank equal to 1.
16

Tell me about a time your analysis changed a business decision.

Save to ▾
Show answer
Situation: the marketing team planned to increase spend on a segment they believed was growing. Task: check the trend before budget approval. Action: I built a cohort analysis using FIXED first purchase date and found repeat purchase rates in that segment had fallen for three quarters. Result: they shifted part of the budget to retention campaigns, and repeat purchases improved the next quarter.
17

How do filters interact with LOD expressions?

Save to ▾
Show answer
Extract, data source and context filters apply before FIXED, so they change FIXED results. Normal dimension filters apply after FIXED, so they do not affect it but do affect INCLUDE and EXCLUDE. Measure filters apply later still. Therefore, to make a region filter change a FIXED total, add it to context. Knowing this order prevents incorrect percent-of-total and cohort results.
18

What are the performance considerations of LOD expressions?

Save to ▾
Show answer
Each LOD generates a subquery joined back to the main query, so many LODs on large live data increase query complexity. FIXED on high-cardinality dimensions such as Order ID can be expensive. Keep the number of LODs small, prefer extracts, use FIXED with minimal dimensions, and check performance recordings. Sometimes pre-aggregating in the database is better than complex nested LODs.
19

Find customers whose latest order is more than 90 days old.

Save to ▾
Show answer
Last Order: {FIXED [Customer ID] : MAX([Order Date])} Churn Flag: IF DATEDIFF('day', [Last Order], TODAY()) > 90 THEN 'At risk' ELSE 'Active' END Use Churn Flag as a dimension with COUNTD([Customer ID]) to size the at-risk segment, and list customers in a detail sheet for the sales team.
20

Management wants new versus repeat customers per month. How would you build it?

Save to ▾
Show answer
Create First Purchase Month: {FIXED [Customer ID] : MIN(DATETRUNC('month', [Order Date]))}. Then Customer Type: IF DATETRUNC('month', [Order Date]) = [First Purchase Month] THEN 'New' ELSE 'Repeat' END. Put MONTH(Order Date) on Columns, COUNTD(Customer ID) on Rows and Customer Type on Color. Validate a few customers manually to make sure classification is correct.
21

You need the average of daily totals, but data is at transaction level. How do you calculate it?

Save to ▾
Show answer
Compute daily totals first with an LOD, then average: AVG({FIXED DATETRUNC('day', [Order Date]) : SUM([Sales])}). If it must respond to filters such as Region, use INCLUDE instead: AVG({INCLUDE DATETRUNC('day', [Order Date]) : SUM([Sales])}) with the view at month or region level. Averaging raw transactions would give average ticket size, which is a different metric.
22

Describe a time you mentored a junior analyst on Tableau.

Save to ▾
Show answer
Situation: a new team member struggled with LOD expressions and kept producing wrong totals. Task: help her become independent. Action: I set up weekly thirty-minute sessions, explained the order of operations with small examples, reviewed her workbooks with comments, and shared a checklist. Result: within six weeks she delivered a cohort dashboard on her own, and the checklist became part of team onboarding.

Frequently asked questions

How important is LOD Expressions in Tableau interviews?

Level of Detail expressions compute aggregations at a level different from the view using FIXED, INCLUDE and EXCLUDE. Learn cohort analysis, first purchase dates, percent of total, customer frequency and churn flags, and understand how filters and context interact with LODs. This is the most tested advanced topic in Tableau interviews.

How should I use the LOD Expressions sheet?

Go top to bottom — easy to hard. Answer before opening each answer, tick what you solved and save misses to Last-Minute Revision.