28. End-to-End Project: Blinkit Quick-Commerce Dashboard
28.5 Step 4 – Create the Measures
| Folder | Measure | DAX |
|---|---|---|
| Sales | Total Sales | SUM(Orders[Amount]) |
| Sales | Total Discount | SUM(Orders[Discount]) |
| Sales | AOV | DIVIDE([Total Sales], [Delivered Orders]) |
| Sales | Gross Margin % | DIVIDE([Gross Profit], [Total Sales]) (see Module 13.5) |
| Sales | Delivery Fee Revenue | SUMX(VALUES(Orders[Order ID]), CALCULATE(MAX(Orders[Delivery Fee]))) |
| Orders | Total Orders | DISTINCTCOUNT(Orders[Order ID]) |
| Orders | Delivered Orders | CALCULATE([Total Orders], Orders[Order Status] = "Delivered") |
| Orders | Cancelled Orders | CALCULATE([Total Orders], Orders[Order Status] = "Cancelled") |
| Orders | Cancellation Rate | DIVIDE([Cancelled Orders], [Total Orders]) |
| Orders | Orders per Dark Store | DIVIDE([Total Orders], DISTINCTCOUNT(Orders[Store ID])) |
| Delivery | Avg Delivery Time (mins) | AVERAGEX(VALUES(Orders[Order ID]), CALCULATE(MAX(Orders[Delivery Time Mins]))) |
| Delivery | % Orders Delivered Under 10 Mins | DIVIDE(CALCULATE([Delivered Orders], Orders[Delivery Time Mins] <= 10), [Delivered Orders]) |
| Delivery | Store Speed Rank | RANKX(ALL(DarkStore[Store Name]), [Avg Delivery Time (mins)], , ASC, DENSE) |
| Customers | Active Customers | DISTINCTCOUNT(Orders[Customer ID]) |
| Customers | Repeat Customer % | DIVIDE(COUNTROWS(FILTER(VALUES(Customer[Customer ID]), [Total Orders] > 1)), [Active Customers]) |
| Time | Sales LY | CALCULATE([Total Sales], SAMEPERIODLASTYEAR('Date'[Date])) |
| Time | YoY Growth % | DIVIDE([Total Sales] - [Sales LY], [Sales LY]) |
| Time | Orders Previous Month | CALCULATE([Total Orders], DATEADD('Date'[Date], -1, MONTH)) |
| Time | MoM Orders Growth % | DIVIDE([Total Orders] - [Orders Previous Month], [Orders Previous Month]) |
| Time | Sales YTD | TOTALYTD([Total Sales], 'Date'[Date]) |
| Time | Orders 7D Moving Avg | see Module 13.16 |
| Time | Festival Orders | CALCULATE([Total Orders], 'Date'[Is Festival Day] = TRUE()) |
| Platform | Blinkit Orders | CALCULATE([Total Orders], Orders[Platform] = "Blinkit") |
| Platform | Amazon Now Orders | CALCULATE([Total Orders], Orders[Platform] = "Amazon Now") |
| Platform | Blinkit Share of Orders % | DIVIDE([Blinkit Orders], CALCULATE([Total Orders], REMOVEFILTERS(Orders[Platform]))) |
| Ranking | Top 5 Products Sales | CALCULATE([Total Sales], TOPN(5, ALL(Product[Product Name]), [Total Sales])) |
| UI | Selected City | SELECTEDVALUE(DarkStore[City], "All Cities") |
| UI | Report Title | "Blinkit Operations – " & [Selected City] |
| UI | Delivery Time Colour | IF([Avg Delivery Time (mins)] <= 10, "#107C10", "#D13438") |
Format currency measures with the ₹ symbol (e.g. ₹ #,##0), time measures with one decimal place, and percentage measures with one decimal place.
Ravindra Bagale's Tip
A common mistake is writing every KPI from scratch instead of reusing base measures. Build Total Sales, Total Orders and Delivered Orders first, then build AOV, Cancellation Rate and YoY on top. Put all measures in a measure table with display folders. Don't worry – after doing it two or three times, it becomes a habit.
Ravindra Bagale's Tip – मराठी
एक common चूक म्हणजे base measures पुन्हा वापरण्याऐवजी प्रत्येक KPI शून्यापासून लिहिणं. आधी Total Sales, Total Orders आणि Delivered Orders बनवा, मग त्यांच्यावर AOV, Cancellation Rate आणि YoY बांधा. सगळे measures display folders असलेल्या measure table मध्ये ठेवा. घाबरू नका, दोन-तीन वेळा केलं की सवय होते.
Ravindra Bagale's Tip – हिंदी
एक common गलती है base measures दोबारा इस्तेमाल करने की जगह हर KPI शुरू से लिखना. पहले Total Sales, Total Orders और Delivered Orders बनाओ, फिर उन पर AOV, Cancellation Rate और YoY बनाओ. सारे measures को display folders वाली measure table में रखो. घबराओ मत, दो-तीन बार करने पर आदत हो जाती है.