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

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.

Wednesday, June 17, 2026

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

 

1. How would you calculate Customer Lifetime Value (CLV)?

Calculate total revenue generated by a customer throughout their relationship with the company.

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

For Average CLV:

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

Interview Follow-up: Why use FIXED LOD instead of SUM(Sales)? Because CLV should be calculated at Customer level regardless of view granularity.


2. How would you identify customers likely to churn?

Find customers who haven't purchased in the last 180 days.

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

These customers can be targeted with retention campaigns.


3. How would you calculate Year-to-Date (YTD) Sales?

Calculate sales from January 1st until today.

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

Then aggregate:

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

4. How would you calculate Same Period Last Year (SPLY) Sales?

Compare current YTD against previous year's YTD.

IF YEAR([Order Date]) = YEAR(TODAY()) - 1
AND DATEPART('dayofyear',[Order Date])
<= DATEPART('dayofyear',TODAY())
THEN [Sales]
END

This is frequently asked in Tableau and Power BI interviews.


5. How would you identify the Top Customer in each Region and Category simultaneously?

Rank customers within Region and Category.

RANK(SUM([Sales])) = 1

Compute Using: Customer Name
Partition By: Region, Category

This returns the highest revenue-generating customer for every Region-Category combination.


Bonus Architect-Level Question

How would you calculate Repeat Purchase Rate?

Percentage of customers who placed more than one order.

COUNTD(
IF
{ FIXED [Customer ID] :
COUNTD([Order ID])
} > 1
THEN [Customer ID]
END
)
/
COUNTD([Customer ID])

This is one of the most commonly used KPIs in Retail, E-commerce, and Customer Analytics projects.

Tuesday, June 16, 2026

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

 

1. How would you identify customers who purchased in consecutive months?

Find customers whose purchase month difference is exactly 1.

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

This helps analyze customer engagement and retention.


2. How would you identify customers whose latest purchase amount is greater than their first purchase amount?

Compare sales from first and latest purchase.

First Purchase Date

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

Latest Purchase Date

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

Flag customers where latest purchase value exceeds first purchase value.


3. How would you calculate the percentage of customers acquired each month?

Count first-time customers in a month divided by total customers.

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

4. How would you identify products that are sold together frequently?

Create combinations using Order ID.

COUNTD([Order ID])

Then analyze Product A and Product B combinations using self-join in the data source.

This is commonly called Market Basket Analysis.


5. How would you identify customers whose profit is increasing for 3 consecutive months?

Compare profit values across months.

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

AND

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

Useful for identifying growing customers.


6. How would you calculate customer concentration risk?

Measure sales dependency on top customers.

WINDOW_SUM(
IF RANK(SUM([Sales])) <= 5
THEN SUM([Sales])
END
)
/
WINDOW_SUM(SUM([Sales]))

Shows % of revenue coming from Top 5 customers.


7. How would you identify customers whose order frequency is decreasing?

Compare current period order count with previous period.

COUNTD([Order ID])
<
LOOKUP(COUNTD([Order ID]),-1)

Helps identify customers at risk of churn.


8. How would you calculate the average discount given per customer?

Aggregate discount at customer level.

{ FIXED [Customer ID] :
AVG([Discount])
}

Useful for discount optimization analysis.


9. How would you identify products that are profitable but have declining sales?

Combine profit and sales trend.

SUM([Profit]) > 0

AND

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

These products may need marketing support rather than pricing changes.


10. How would you identify regions where sales are increasing but profits are decreasing?

Compare sales growth and profit growth together.

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

AND

SUM([Profit])
<
LOOKUP(SUM([Profit]),-1)

This often indicates excessive discounting or rising costs.


These are closer to the real Tableau interview scenarios asked in Deloitte, Accenture, Cognizant, TCS, Infosys, Capgemini, EY, KPMG, EXL, Tiger Analytics, Fractal, and BI Architect interviews than the basic Top-N and Running Total questions.

Friday, June 12, 2026

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

 

1. How would you identify customers whose profit margin is higher than the company average?

Compare customer profit margin against overall company profit margin.

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

This helps identify highly profitable customers.


2. How would you calculate the percentage of sales contributed by the Top 10 customers?

First identify Top 10 customers, then divide their sales by total sales.

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

Contribution %:

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

3. How would you identify products whose current month sales are lower than last month?

Compare current month sales with previous month sales.

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

Compute using Month.

This highlights declining products.


4. How would you calculate customer tenure in days?

Calculate the number of days from first purchase until today.

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

This is commonly used in Customer Lifetime Value analysis.


5. How would you identify regions where profit growth is negative?

Compare current period profit against previous period profit.

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

This identifies regions experiencing profit decline.

Top Tableau Scenario-Based Interview Questions Set -28 (1- 7)

 

1. How would you identify the customer who contributed the highest profit in each region?

Use Rank on Profit and partition by Region.

RANK(SUM([Profit])) = 1

Compute Using: Customer Name
Partition By: Region

This returns the top profit-generating customer in every region.


2. How would you calculate the average number of days taken to ship an order?

Calculate the difference between Order Date and Ship Date.

AVG(
DATEDIFF(
'day',
[Order Date],
[Ship Date]
))

This measures shipping efficiency.


3. How would you identify products that have sales in every month of the year?

Count distinct sales months and compare with 12.

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

This identifies consistently selling products.


4. How would you calculate each customer's share of profit within their region?

Divide customer profit by total regional profit.

SUM([Profit])
/
WINDOW_SUM(SUM([Profit]))

Set Compute Using: Customer Name.

This shows profit contribution within a region.


5. How would you identify orders where discount is given but profit is negative?

Filter orders having discount and loss.

[Discount] > 0
AND
[Profit] < 0

Useful for identifying poor discounting strategies.


6. How would you calculate the average revenue generated per active month?

Divide total sales by distinct active months.

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

This gives average monthly revenue.


7. How would you identify customers whose latest purchase amount is higher than their average purchase amount?

Compare latest order sales with customer average sales.

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

Compare it against:

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

This identifies customers whose recent spending is above their historical average.

Wednesday, June 10, 2026

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

 

1. How would you identify customers who generated profit in every year?

Count the number of years with positive profit and compare it with total years.

{ FIXED [Customer ID] :
COUNTD(
IF [Profit] > 0
THEN YEAR([Order Date])
END
)
}
=
{ FIXED : COUNTD(YEAR([Order Date])) }

This returns customers who were profitable every year.


2. How would you calculate the percentage change between current sales and average sales?

Compare current sales against overall average sales.

(
SUM([Sales])
-
WINDOW_AVG(SUM([Sales]))
)
/
WINDOW_AVG(SUM([Sales]))

This shows how much a value is above or below the average.


3. How would you identify the customer with the highest single order value?

Compare each order against the maximum order amount.

SUM([Sales])
=
WINDOW_MAX(SUM([Sales]))

This returns the order/customer with the highest order value.


4. How would you calculate the ratio of profit to quantity sold?

Measure profit earned per unit sold.

SUM([Profit])
/
SUM([Quantity])

Useful for analyzing product efficiency and profitability.


5. How would you identify products whose sales are greater than the average sales of their category?

Compare product sales with category-level average using FIXED LOD.

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

This highlights products outperforming their category average.

Monday, June 8, 2026

Top Tableau Scenario-Based Interview Questions Set - 24 (1- 3)

 

How would you identify customers who buy only one product category?

Count distinct categories purchased by each customer and filter those with exactly one category.

Example:

{ FIXED [Customer ID] : COUNTD([Category]) } = 1

This helps identify customers with limited product adoption and cross-sell opportunities.


2. How would you calculate the percentage of customers retained from the previous year?

Count customers who purchased in both the current and previous year and divide by last year's customers.

Example:

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

This provides a simple annual customer retention metric.


3. How would you identify the category contributing the highest profit percentage?

Calculate each category's share of total profit and rank it.

Example:

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

To get the top category:

RANK(SUM([Profit])) = 1

This highlights the category contributing the largest share of company profit.

Sunday, June 7, 2026

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

 

1. How would you identify customers whose average order value is greater than the overall average order value?

Calculate customer AOV and compare it with the overall AOV.

Example:

SUM([Sales]) / COUNTD([Order ID])
>
{ FIXED : SUM([Sales]) / COUNTD([Order ID]) }

This highlights customers spending more per order than the average customer.


2. How would you calculate the percentage of sales generated by new customers?

Identify first-time customers and divide their sales by total sales.

Example:

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

This shows how much revenue comes from newly acquired customers.


3. How would you identify products with no sales in the last 12 months?

Compare the latest sale date for each product against today's date.

Example:

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

This helps identify obsolete or inactive products.


4. How would you calculate the running count of distinct customers over time?

Use a running total on customer acquisitions.

Example:

RUNNING_SUM(
COUNTD([Customer ID])
)

Place Month on Columns and compute using Month.


5. How would you identify categories where profit margin is below the company average?

Compare category profit margin against overall profit margin.

Example:

SUM([Profit]) / SUM([Sales])
<
{ FIXED : SUM([Profit]) / SUM([Sales]) }

This quickly highlights underperforming categories that need attention.

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.