Ravindra BagaleCourses & study guides मराठी Track your progress

35. More Real-World Project Briefs

35.3 E-commerce Seller

Pointer. Amazon Now as a delivery platform is already inside Module 28. This brief is a fictional marketplace seller, one brand, six cities, no dark-store operations page.

Business question. Which city returns the most, and what is net sales after returns?

Tables. OrderLine (Order ID, Date, City, Customer, SKU, Qty, Amount, Status). Status values you define: Placed, Delivered, Returned. SKU dimension. Date. Customers only from the class list, for example Zoya in Pune, Amir in Nagpur, Ravina in Mumbai.

Measures.

Gross Sales = CALCULATE(SUM(OrderLine[Amount]), OrderLine[Status] = "Delivered")
Returns = CALCULATE(SUM(OrderLine[Amount]), OrderLine[Status] = "Returned")
Net Sales = [Gross Sales] - [Returns]
Return % = DIVIDE([Returns], [Gross Sales] + [Returns])

Pages. Cards for Gross, Returns, Net. A line chart of Net by week. A bar of Return % by city. A drill-through page (Module 17) on SKU. Do not add a delivery-time page; that is Module 28 again.

Sample layout for this brief, using the fictional rows already on the page.

Sample layout — fictional data. The picture uses the worked rows in this brief. It does not add a table.

Worked rows (fictional sample data).

City Customer Status Amount
Pune Zoya Delivered ₹2,000
Pune Zoya Returned ₹500
Nashik Amir Delivered ₹1,500
Nashik Amir Delivered ₹500
Nagpur Salman Delivered ₹800
Mumbai Ravina Returned ₹400
Kolhapur Rani Delivered ₹1,000
Sambhaji Nagar Shahrukh Delivered ₹700

Gross sales (status Delivered) are 2,000+1,500+500+800+1,000+700 = ₹6,500. Returns are 500+400 = ₹900. Net sales are 6,500 − 900 = ₹5,600. Return %, as in the measure above, is returns divided by gross plus returns. 900 ÷ (6,500+900) = 900 ÷ 7,400 = 12.2%.

Pune return % is 500 ÷ (2,000+500) = 20.0%. Nashik returns are ₹0, so Nashik return % is 0 on ₹2,000 delivered.

Starter file: brief_35_3_ecommerce_orders.csv – the worked rows above as a CSV (fictional practice data). Load it with Get data › Text/CSV, build the measures, then check your cards.

Expected values to check

Gross ₹6,500 · Returns ₹900 · Net ₹5,600 · Return % 12.2% · Pune return % 20.0%

Good KPI Vanity metric
From the same rows Net sales ₹5,600 and return 12.2% 6 delivered orders
Why ₹900 came back. Pune's one return is a fifth of Pune's delivered-plus-returned value. Six delivered ticks look like a good week and ignore Zoya's return and Ravina's return.

What the manager does. The Pune seller opens Zoya's ₹500 return (size, damage, or late) before paying for more sessions. The Nashik seller does not copy a Pune listing that returns 20%. Mumbai's only row in this file is a return. Do not drop Mumbai from the bar chart because the delivered card is blank. A blank delivered card with a return is the point.

Ravindra Bagale's Tip

Many students subtract returns twice, once in the SQL view and again in the measure. Subtract them in one place only. One status column, one measure. Look at one order row in query view. Pay attention!