Friday, May 29, 2026

Top Tableau Scenario-Based Interview Questions Set - 15 (1- 8)

 

How would you identify customers who purchased in consecutive months?

Use a table calculation to compare purchase months for each customer.

Example:

DATEDIFF(
'month',
LOOKUP(MIN([Order Date]),-1),
MIN([Order Date])
) = 1

2. How would you calculate the percentage of orders shipped late?

Divide late orders by total orders.

Example:

SUM(
IF [Ship Date] > [Required Date]
THEN 1
ELSE 0
END
)
/
COUNT([Order ID])

3. How would you identify the customer with the highest lifetime sales?

Use a FIXED LOD to calculate total sales per customer and rank them.

Example:

{ FIXED [Customer ID] : SUM([Sales]) }

Rank:

RANK(
{ FIXED [Customer ID] : SUM([Sales]) }
)
= 1

4. How would you calculate average monthly profit?

Aggregate profit at month level and average it.

Example:

WINDOW_AVG(SUM([Profit]))

Or:

SUM([Profit])
/
COUNTD(DATETRUNC('month',[Order Date]))

5. How would you identify regions where sales exceeded target?

Compare actual sales against target.

Example:

SUM([Sales]) > SUM([Target Sales])

Variance:

SUM([Sales]) - SUM([Target Sales])

6. How would you find customers who have not purchased in the last 6 months?

Calculate days since the last purchase.

Example:

DATEDIFF(
'month',
{ FIXED [Customer ID] : MAX([Order Date]) },
TODAY()
) > 6

7. How would you calculate the average gap between customer orders?

Find the difference between consecutive order dates.

Example:

DATEDIFF(
'day',
LOOKUP(MIN([Order Date]),-1),
MIN([Order Date])
)

Then apply:

WINDOW_AVG(
DATEDIFF(
'day',
LOOKUP(MIN([Order Date]),-1),
MIN([Order Date])
)
)

8. How would you identify the most profitable customer in each region?

Rank customers by profit within each region.

Example:

RANK(SUM([Profit])) = 1

Set Compute Using = Customer and Partition By = Region.

1 comment:

  1. Top Tableau Scenario-Based Interview Questions Set - 15 (1- 8)

    ReplyDelete