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.