How would you identify duplicate records in Tableau?
Use COUNT on unique key and filter records greater than 1.
Example:COUNT([Order ID]) > 1-
How would you calculate year-to-date (YTD) sales?
Use DATESYTD function to aggregate current year sales.
Example:IF DATESYTD([Order Date]) THEN SUM([Sales]) END -
How would you calculate quarter-to-date (QTD) sales?
Use quarter truncation with date comparison.
Example:DATETRUNC('quarter',[Order Date]) =
DATETRUNC('quarter',TODAY()) -
How would you identify customers with highest profit ratio?
Calculate Profit divided by Sales and rank customers.
Example:SUM([Profit]) / SUM([Sales]) -
How would you create a sales trend line in Tableau?
Add Sales to Rows and Order Date to Columns, then enable Trend Line.
Example:SUM([Sales]) -
How would you display dynamic currency conversion?
Use parameter for currency selection and apply conversion rate.
Example:CASE [Currency]
WHEN "USD" THEN SUM([Sales])
WHEN "INR" THEN SUM([Sales]) * 83
END -
How would you highlight the latest month sales in a chart?
Compare month with maximum date month.
Example:DATETRUNC('month',[Order Date]) =
{ FIXED : MAX(DATETRUNC('month',[Order Date])) } -
How would you create a dynamic Top/Bottom N analysis?
Use parameter and Rank calculation.
Example:IF RANK(SUM([Sales])) <= [Top N]
THEN "Top"
ELSE "Others"
END -
How would you calculate average delivery time?
Use DATEDIFF between order and ship dates.
Example:AVG(DATEDIFF('day',[Order Date],[Ship Date])) -
How would you identify negative profit products over multiple years?
Filter products with negative total profit.
Example:
SUM([Profit]) < 0