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.