How would you calculate contribution margin in Tableau?
Subtract cost from sales and divide by sales percentage.
Example:(SUM([Sales]) - SUM([Cost])) / SUM([Sales])-
How would you identify repeat customers?
Count distinct orders per customer and filter customers with more than one order.
Example:COUNTD([Order ID]) > 1 -
How would you display sales only for the current year?
Compare order year with current year.
Example:YEAR([Order Date]) = YEAR(TODAY()) -
How would you calculate average monthly sales?
Divide total sales by distinct months.
Example:SUM([Sales]) / COUNTD(DATETRUNC('month',[Order Date])) -
How would you identify customers with decreasing profit?
Compare current profit with previous period profit.
Example:SUM([Profit]) < LOOKUP(SUM([Profit]),-1) -
How would you create a sales bucket classification?
Group sales into ranges using calculated field.
Example:IF SUM([Sales]) < 10000 THEN "Low"
ELSEIF SUM([Sales]) < 50000 THEN "Medium"
ELSE "High"
END -
How would you calculate percentage difference from average sales?
Compare sales against average sales.
Example:(SUM([Sales]) - WINDOW_AVG(SUM([Sales])))
/ WINDOW_AVG(SUM([Sales])) -
How would you identify delayed shipments?
Calculate shipping days and filter delayed orders.
Example:DATEDIFF('day',[Order Date],[Ship Date]) > 7 -
How would you create a dynamic date range filter?
Use parameters for start and end dates.
Example:[Order Date] >= [Start Date]
AND
[Order Date] <= [End Date] -
How would you display cumulative profit trend?
Use running total calculation on Profit.
Example:
RUNNING_SUM(SUM([Profit]))