Saturday, June 20, 2026

Tableau Scenario-Based Interview Questions 1-5

 

1. How would you calculate Year-over-Year (YoY) Growth for each Product?

Compare current year's sales with the previous year's sales at Product level.

(
SUM([Sales])
-
LOOKUP(SUM([Sales]),-1)
)
/
ABS(LOOKUP(SUM([Sales]),-1))

Compute Using: Year
Partition By: Product

This helps identify fast-growing and declining products.


2. How would you identify customers who have increased their spending every year?

Check whether sales are continuously increasing year-over-year.

SUM([Sales]) >
LOOKUP(SUM([Sales]),-1)

AND

LOOKUP(SUM([Sales]),-1) >
LOOKUP(SUM([Sales]),-2)

This identifies loyal customers with growing business value.


3. How would you calculate Basket Size (Average Items per Order)?

A common Retail and E-Commerce KPI.

SUM([Quantity])
/
COUNTD([Order ID])

Example:

  • Quantity Sold = 10,000
  • Orders = 2,000

Basket Size = 5 Items per Order


4. How would you identify products frequently purchased together?

Use a self-join on Order ID.

Data Source Logic

SELECT
A.OrderID,
A.ProductName Product1,
B.ProductName Product2
FROM Orders A
JOIN Orders B
ON A.OrderID = B.OrderID
AND A.ProductName <> B.ProductName

In Tableau:

COUNTD([Order ID])

Higher counts indicate strong product affinity.


5. How would you calculate Customer Retention Rate?

Customers who purchased this year and also purchased last year.

COUNTD(
IF YEAR([Order Date]) = YEAR(TODAY())
AND
{ FIXED [Customer ID] :
MIN(YEAR([Order Date]))
}
< YEAR(TODAY())
THEN [Customer ID]
END
)
/
COUNTD([Customer ID])

This is one of the most important KPIs in customer analytics and subscription businesses.


Interview Follow-up

A senior Tableau interviewer may ask:

"When would you use Table Calculation vs LOD vs Custom SQL?"

Answer:

  • Table Calculation → Running Total, Rank, Moving Average.
  • LOD → Customer-level, Product-level fixed calculations.
  • Custom SQL → Heavy transformations better handled before Tableau.
  • Best Practice: Push large calculations to the database whenever possible for better performance.

Thursday, June 18, 2026

Top Tableau Scenario-Based Interview Questions Set -34 (1- 5) - Important

 

1. How would you calculate Month-to-Date (MTD), Quarter-to-Date (QTD), and Year-to-Date (YTD) Sales?

These are very common business reporting requirements.

MTD Sales

IF DATETRUNC('month',[Order Date])
=
DATETRUNC('month',TODAY())
THEN [Sales]
END

QTD Sales

IF DATETRUNC('quarter',[Order Date])
=
DATETRUNC('quarter',TODAY())
THEN [Sales]
END

YTD Sales

IF YEAR([Order Date])
=
YEAR(TODAY())
THEN [Sales]
END

Interview Follow-up: Difference between YTD and Running Total?

  • YTD resets every year.
  • Running Total continues across all periods.

2. How would you calculate Year-over-Year (YoY) Growth %?

A very frequently asked Tableau interview question.

(
SUM([Sales])
-
LOOKUP(SUM([Sales]),-1)
)
/
ABS(
LOOKUP(SUM([Sales]),-1)
)

Example:

YearSales
2024100K
2025120K

Growth = (120K-100K)/100K = 20%


3. How would you find customers who purchased in every month of the year?

Useful in customer loyalty analysis.

{ FIXED [Customer ID] :
COUNTD(
DATETRUNC('month',[Order Date])
)
}
= 12

Returns customers who purchased in all 12 months.


4. How would you identify the Top 20% Customers contributing 80% Revenue (Pareto Analysis)?

Sort customers by Sales descending.

RUNNING_SUM(SUM([Sales]))
/
TOTAL(SUM([Sales]))

Filter:

RUNNING_SUM(SUM([Sales]))
/
TOTAL(SUM([Sales]))
<= 0.8

This identifies the customers contributing to the first 80% of revenue.


5. How would you implement Row-Level Security (RLS) in Tableau?

One of the most important enterprise interview questions.

Security Table

UserRegion
AnitaEast
RaviWest

Join security table with fact table.

Create filter:

USERNAME() = [User]

Or

[Region] = ATTR([User Region])

Result:

  • Anita sees East data only.
  • Ravi sees West data only.

Interview Tip: If asked "How have you implemented RLS in Tableau?" mention:

  • Security Mapping Table
  • USERNAME() Function
  • Entitlement Table
  • Published Data Source Security

These are the approaches used in enterprise Tableau environments.