1. How would you calculate the difference between current month's sales and the average sales of the last 3 months?
Use a moving average and subtract it from current sales.
SUM([Sales]) -
WINDOW_AVG(SUM([Sales]),-2,0)
2. How would you identify customers whose total sales exceed ₹1,00,000?
Create a conditional flag.
IF { FIXED [Customer ID] : SUM([Sales]) } > 100000
THEN "High Value"
ELSE "Normal"
END
3. How would you find the first order amount for each customer?
Use FIXED LOD to get the first order date.
IF [Order Date] =
{ FIXED [Customer ID] : MIN([Order Date]) }
THEN [Sales]
END
4. How would you calculate month-over-month profit growth %?
Compare current month profit with previous month.
(
SUM([Profit]) -
LOOKUP(SUM([Profit]),-1)
)
/
ABS(LOOKUP(SUM([Profit]),-1))
5. How would you identify products that generated more than ₹50,000 profit?
Create a flag using FIXED LOD.
IF { FIXED [Product Name] : SUM([Profit]) } > 50000
THEN "Top Product"
END
6. How would you calculate average sales per order?
Divide sales by distinct order count.
SUM([Sales])
/
COUNTD([Order ID])
7. How would you identify customers whose latest order was placed this month?
Compare latest order month with current month.
DATETRUNC('month',
{ FIXED [Customer ID] : MAX([Order Date]) }
)
=
DATETRUNC('month',TODAY())
8. How would you calculate cumulative profit percentage?
Divide running profit by total profit.
RUNNING_SUM(SUM([Profit]))
/
TOTAL(SUM([Profit]))
9. How would you identify the top customer within each region?
Rank customer sales by region.
RANK(SUM([Sales])) = 1
Compute Using: Customer Name
Partition By: Region
10. How would you calculate the average monthly sales for each customer?
Calculate total sales per customer divided by active months.
{ FIXED [Customer ID] : SUM([Sales]) }
/
{ FIXED [Customer ID] :
COUNTD(DATETRUNC('month',[Order Date]))
}
This gives the average sales generated by a customer per active month.