Showing posts with label Tableau Scenario-Based Interview Questions. Show all posts
Showing posts with label Tableau Scenario-Based Interview Questions. Show all posts

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.

Tuesday, June 9, 2026

Top Tableau Scenario-Based Interview Questions Set - 26 (1- 10)

 

1. How would you calculate the difference between current month's sales and the average sales of the last 3 months?

Use a moving average and subtract it from current sales.

SUM([Sales]) -
WINDOW_AVG(SUM([Sales]),-2,0)

2. How would you identify customers whose total sales exceed ₹1,00,000?

Create a conditional flag.

IF { FIXED [Customer ID] : SUM([Sales]) } > 100000
THEN "High Value"
ELSE "Normal"
END

3. How would you find the first order amount for each customer?

Use FIXED LOD to get the first order date.

IF [Order Date] =
{ FIXED [Customer ID] : MIN([Order Date]) }
THEN [Sales]
END

4. How would you calculate month-over-month profit growth %?

Compare current month profit with previous month.

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

5. How would you identify products that generated more than ₹50,000 profit?

Create a flag using FIXED LOD.

IF { FIXED [Product Name] : SUM([Profit]) } > 50000
THEN "Top Product"
END

6. How would you calculate average sales per order?

Divide sales by distinct order count.

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

7. How would you identify customers whose latest order was placed this month?

Compare latest order month with current month.

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

8. How would you calculate cumulative profit percentage?

Divide running profit by total profit.

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

9. How would you identify the top customer within each region?

Rank customer sales by region.

RANK(SUM([Sales])) = 1

Compute Using: Customer Name
Partition By: Region


10. How would you calculate the average monthly sales for each customer?

Calculate total sales per customer divided by active months.

{ FIXED [Customer ID] : SUM([Sales]) }
/
{ FIXED [Customer ID] :
COUNTD(DATETRUNC('month',[Order Date]))
}

This gives the average sales generated by a customer per active month.

Monday, June 8, 2026

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

 

1. How would you identify customers who purchased in the current month but not in the previous month?

Compare customer purchases between the current and previous month.

Example:

COUNTD(
IF DATETRUNC('month',[Order Date]) =
DATETRUNC('month',TODAY())
THEN [Customer ID]
END
)
>
COUNTD(
IF DATETRUNC('month',[Order Date]) =
DATEADD('month',-1,DATETRUNC('month',TODAY()))
THEN [Customer ID]
END
)

This helps identify newly active customers.


2. How would you calculate the percentage of orders that are profitable?

Divide profitable orders by total orders.

Example:

COUNTD(
IF [Profit] > 0
THEN [Order ID]
END
)
/
COUNTD([Order ID])

This measures the quality of orders rather than just revenue.


3. How would you identify the top-selling product within each sub-category?

Use a rank calculation partitioned by Sub-Category.

Example:

RANK(SUM([Sales])) = 1

Compute Using: Product Name
Partition By: Sub-Category


4. How would you calculate the average profit per customer?

Divide total profit by distinct customer count.

Example:

SUM([Profit])
/
COUNTD([Customer ID])

This shows the profitability of the customer base.


5. How would you identify customers whose sales contribute more than 5% of total company sales?

Calculate customer contribution percentage and filter.

Example:

SUM([Sales])
/
TOTAL(SUM([Sales]))
> 0.05

This highlights key customers contributing significantly to revenue.

Friday, June 5, 2026

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

 

1. How would you identify customers who have not placed any order in the last 90 days?

Calculate the difference between today's date and the customer's last order date.

Example:

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

2. How would you calculate the average sales of the Top 10 customers?

Rank customers by sales and average the Top 10.

Example:

IF RANK(SUM([Sales])) <= 10
THEN SUM([Sales])
END

Then place:

AVG([Top 10 Sales])

in the view.


3. How would you identify products whose sales are below the overall average sales?

Compare product sales against overall average sales.

Example:

SUM([Sales])
<
WINDOW_AVG(SUM([Sales]))

Compute using Product.


4. How would you calculate customer recency score?

Measure the number of days since the last purchase.

Example:

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

Lower values indicate more recent customers.


5. How would you identify the top-performing sub-category within each category?

Rank sub-categories by sales within each category.

Example:

RANK(SUM([Sales])) = 1

Compute Using: Sub-Category
Partition By: Category

This returns the highest-selling sub-category for each category.

Thursday, June 4, 2026

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

 

1. How would you identify customers whose sales are declining for 3 consecutive months?

Compare current month sales with the previous two months using table calculations.

Example:

SUM([Sales]) < LOOKUP(SUM([Sales]),-1)
AND
LOOKUP(SUM([Sales]),-1) < LOOKUP(SUM([Sales]),-2)

2. How would you calculate the percentage of new customers each month?

Identify customers whose first purchase occurred in the selected month and divide by total customers.

Example:

COUNTD(
IF DATETRUNC('month',[Order Date]) =
{ FIXED [Customer ID] : DATETRUNC('month',MIN([Order Date])) }
THEN [Customer ID]
END
)
/
COUNTD([Customer ID])

3. How would you identify products with sales above the category average?

Compare product sales against category average using a FIXED LOD.

Example:

SUM([Sales]) >
{ FIXED [Category] : AVG([Sales]) }

4. How would you calculate customer profitability ranking?

Rank customers based on total profit generated.

Example:

RANK(SUM([Profit]))

Sort Profit descending to get highest-profit customers at Rank 1.


5. How would you identify regions contributing more than 25% of total sales?

Calculate regional contribution and filter regions above 25%.

Example:

SUM([Sales])
/
TOTAL(SUM([Sales]))
> 0.25

This highlights the regions driving a significant portion of overall revenue.

Tuesday, June 2, 2026

Top Tableau Scenario-Based Interview Questions Set - 19 (1- 6)

 

1. How would you identify customers who purchased in every year available in the dataset?

Count distinct years for each customer and compare with total years in the dataset.

Example:

{ FIXED [Customer ID] : COUNTD(YEAR([Order Date])) }
=
{ FIXED : COUNTD(YEAR([Order Date])) }

2. How would you calculate the percentage of profit contributed by each category?

Divide category profit by total profit.

Example:

SUM([Profit])
/
TOTAL(SUM([Profit]))

Format the result as a percentage.


3. How would you identify customers whose latest order was a loss-making order?

Find the latest order and check if profit is negative.

Example:

[Order Date] =
{ FIXED [Customer ID] : MAX([Order Date]) }

Then:

SUM([Profit]) < 0

4. How would you calculate the rolling 3-month average profit?

Use a moving window average over the current and previous two months.

Example:

WINDOW_AVG(SUM([Profit]),-2,0)

5. How would you identify products sold in more than 50% of all regions?

Compare product region count against total regions.

Example:

COUNTD([Region])
/
{ FIXED : COUNTD([Region]) }
> 0.5

6. How would you calculate the average sales per customer within each region?

Divide regional sales by distinct customers in that region.

Example:

SUM([Sales])
/
COUNTD([Customer ID])

Place Region in the view to calculate it region-wise.

Monday, June 1, 2026

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

 

How would you identify customers whose sales increased by more than 20% compared to the previous year?

Calculate YoY growth and filter customers above 20%.

Example:

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

2. How would you calculate the average number of orders per customer?

Divide total distinct orders by total distinct customers.

Example:

COUNTD([Order ID])
/
COUNTD([Customer ID])

3. How would you identify products that have never generated profit?

Filter products whose total profit is zero or negative.

Example:

SUM([Profit]) <= 0

4. How would you calculate the percentage of customers contributing to 80% of sales?

Use cumulative sales percentage and count qualifying customers.

Example:

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

Sort customers by Sales descending before applying the calculation.


5. How would you identify the most recent order for each customer?

Use a FIXED LOD to get the latest order date.

Example:

{ FIXED [Customer ID] : MAX([Order Date]) }

Then filter:

[Order Date] =
{ FIXED [Customer ID] : MAX([Order Date]) }

to display only the latest order record per customer.

Sunday, May 31, 2026

Top Tableau Scenario-Based Interview Questions Set - 17 (1- 10)

 

How would you calculate the percentage of total sales for each product?

Divide product sales by total sales.

Example:

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

2. How would you identify customers who placed only one order?

Count distinct orders per customer and filter those with exactly one order.

Example:

COUNTD([Order ID]) = 1

3. How would you calculate the average sales per day?

Divide total sales by the number of distinct order dates.

Example:

SUM([Sales]) / COUNTD([Order Date])

4. How would you identify the month with the highest sales?

Rank monthly sales and select Rank 1.

Example:

RANK(SUM([Sales])) = 1

5. How would you calculate the sales variance from the previous month?

Subtract previous month's sales from current month's sales.

Example:

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

6. How would you identify products contributing less than 1% of total sales?

Calculate contribution percentage and filter.

Example:

SUM([Sales]) / TOTAL(SUM([Sales])) < 0.01

7. How would you calculate the average order value by region?

Divide regional sales by distinct order count.

Example:

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

Place Region in the view.


8. How would you identify customers who generated a loss?

Filter customers whose total profit is negative.

Example:

SUM([Profit]) < 0

9. How would you calculate the percentage of returned orders?

Divide returned orders by total orders.

Example:

COUNT(
IF [Returned] = "Yes"
THEN [Order ID]
END
)
/
COUNT([Order ID])

10. How would you identify the best-performing state within each region?

Rank states by sales within each region.

Example:

RANK(SUM([Sales])) = 1

Compute Using: State
Partition By: Region

Saturday, May 30, 2026

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

 

1. How would you calculate Customer Retention Rate in Tableau?

Calculate customers who purchased in both current and previous periods divided by total customers.

Example:

COUNTD([Retained Customer ID])
/
COUNTD([Customer ID])

A retained customer can be identified using a Set or LOD calculation.


2. How would you identify the Top 3 Products within each Category?

Use Rank table calculation partitioned by Category.

Example:

RANK(SUM([Sales])) <= 3

Set Compute Using = Product and Restart Every = Category.


3. How would you calculate a customer's first purchase date?

Use a FIXED LOD expression.

Example:

{ FIXED [Customer ID] : MIN([Order Date]) }

This returns the first purchase date regardless of filters in the view.


4. How would you show customers whose sales are above their regional average?

Compare customer sales against the average sales within the region.

Example:

SUM([Sales])
>
WINDOW_AVG(SUM([Sales]))

Compute using Customer and partition by Region.


5. How would you identify the Bottom 10 Products by Profit?

Use Rank on Profit in ascending order.

Example:

RANK(SUM([Profit]),'asc') <= 10

Filter TRUE to display the 10 least profitable products.