flowchart LR A[Awareness<br/>Ad, search,<br/>word-of-mouth] --> B[Consideration<br/>Web, app,<br/>store visit] B --> C[Purchase<br/>Online, in-store,<br/>BOPIS, marketplace] C --> D[Post-Purchase<br/>Delivery, returns,<br/>support] D --> E[Loyalty<br/>Repeat,<br/>advocacy] E --> A style A fill:#E8F0FE,stroke:#1A73E8 style C fill:#FFF7E6,stroke:#F4B400 style E fill:#E6F4EA,stroke:#137333
54 Retail Analytics: Customer Journey and Inventory
54.1 Why Retail Analytics Matters
Every customer interaction generates a row of data — and every store, by closing time, has produced thousands of them.
The receipt, the loyalty swipe, the abandoned online cart, the in-aisle CCTV count, the supplier delivery scan — each is a fact that, in aggregate, tells the story of which products move, which customers come back, and which stores are in trouble. Retail analytics is the discipline of turning that flood of operational data into decisions about what to stock, where to place it, what to charge, and how to get the customer to buy it again.
For a BI analyst, retail clusters into three jobs. Customer journey analytics answers how do customers find us, buy, and return? Inventory and assortment analytics answers what to stock, where, and when? Store and channel performance answers which stores, which channels, which categories are growing or fading? Katherine N. Lemon & Peter C. Verhoef (2016) frame the modern customer journey as inherently multi-touchpoint and multi-channel, with retailers no longer in full control of the path the customer takes. Peter C. Verhoef et al. (2015) document the transition from multi-channel (parallel, siloed channels) to omni-channel (integrated, customer-centric) and argue that the analytical capabilities required for omni-channel are very different from those required for multi-channel.
Three rules separate retail dashboards from every other kind:
- Same-day matters. Retail decisions — markdowns, replenishment, staffing — happen within hours, not weeks. The dashboard must refresh on the cadence of the decision.
- Store-level is the default. A national number with no store-level drill is a press release, not a dashboard. Retail audiences read in the order store → region → national, not the other way.
- Inventory and demand are joined at the hip. A demand chart without an inventory chart is half a story. Always pair them on the same page.
54.2 Customer Journey Analytics
The retail customer journey is rarely linear. A shopper sees a Google ad, browses on mobile, asks a friend, walks into a store, scans a barcode for the online price, leaves, returns next week, buys online, and picks up at the store. Katherine N. Lemon & Peter C. Verhoef (2016) call this the contemporary customer experience landscape and argue that a retailer with no view of it is being out-analysed by retailers who do.
The visualisation question is which paths produce loyal customers, and the canonical chart is a Sankey from awareness through to second-purchase, with link width proportional to customer count. A second view, the path-to-purchase histogram, plots the count of touches per converted customer and reveals whether your buyers are decisive (1-2 touches) or considered (5+ touches). The two ends of the distribution often need different marketing treatments.
The retention curve in retail is the same shape as the cohort retention curve in HR (Chapter 52), but the metric is different. For each customer cohort (defined by first-purchase month), the chart plots percentage who made a second purchase by month 1, 2, 3, … 12. A flat curve at 18 percent says retention is structural; a steeper curve below the average says the cohort had an onboarding problem (perhaps a free-shipping promotion brought in single-use customers). The chart is the engine of the loyalty programme.
Basket analysis (also called market-basket analysis) finds product pairs and triples that frequently appear in the same transaction. The output is association rules — customers who bought bread also bought butter, with confidence 64 percent and lift 2.1. The most useful retail visualisation of association rules is a network graph with products as nodes, edges between frequently-co-purchased pairs, and edge weight = lift. Tableau renders this with a force-directed layout via dual-axis tricks; Power BI does it with the marketplace Force-Directed Graph visual.
A 64 percent confidence rule sounds strong until you realise butter is in 60 percent of all baskets — the rule barely beats chance. Lift, the ratio of observed-co-occurrence to expected-co-occurrence-by-chance, is the metric that filters real associations from popular-item noise. Always sort and chart association rules by lift.
54.3 Inventory and Assortment Analytics
Retail inventory analytics extends the operations grammar of Chapter 51 with two retail-specific layers: assortment (what to stock) and markdown (when and how much to discount).
| Metric | Definition | Visualisation lens |
|---|---|---|
| Sell-Through % | Units sold over a period divided by units received in that period. | Heatmap by SKU and store, with target band conditional formatting. |
| Weeks of Supply (WOS) | Current on-hand divided by average weekly sales rate. | Line chart over time per SKU, with target zone shading. |
| Stock-to-Sales Ratio | Beginning-of-period stock divided by sales for the period. | Trended line per category against industry benchmark. |
| GMROI | Gross margin in rupees divided by average inventory cost. | Sorted bar of categories with reference line for portfolio average. |
GMROI is particularly useful as a category-portfolio decision tool. Plotting GMROI vs space allocation reveals categories that are over-spaced relative to their return — typically the candidates for assortment cuts or shelf rebalancing.
Markdowns are the retail mechanism for clearing inventory that has not sold at full price. The visualisation is a markdown waterfall per category: starts at full-price ticket value, walks through markdown 1, markdown 2, markdown 3, write-off, and arrives at realised revenue. The chart reveals whether markdowns are scheduled and disciplined (small steps, controlled landing) or panicked (large step at end-of-season, big write-off).
A second view, the markdown elasticity chart, plots discount depth against units sold over the markdown period. The slope is the price elasticity for that category. Categories with steep slopes respond well to markdowns; categories with shallow slopes do not — they may need different inventory disposal mechanisms (donation, outlet, secondary market).
For physical retail, the planogram is the diagram of where each SKU sits on each shelf in each store. Planogram performance analytics tracks sales-per-running-foot and sales-per-facing for every SKU and surfaces SKUs that are consuming valuable shelf space without earning their keep. The visualisation is a treemap of categories and sub-categories, sized by space allocation and coloured by sales-per-foot, with under-performing tiles flagged in red.
54.4 Store and Channel Performance
The retail audience reads dashboards in store-region-national hierarchy. Three views dominate.
Same-store-sales (SSS), or comp-sales, compares this period’s sales to last year’s sales for stores open in both periods. New stores are excluded so the metric isolates productivity change rather than network growth. The visualisation is a heatmap of stores (rows) by month (columns) with cell colour = SSS percent change. Persistent red rows are sick stores; persistent red columns are sick months across the network.
In a physical store, conversion is the percentage of door-counter foot traffic that ends in a transaction. Dwell time is the average minutes a shopper spends in the store. Together they tell the story of whether the store is bringing people in (foot traffic), engaging them (dwell), and closing them (conversion). The dashboard view is a four-panel small-multiples per store: foot traffic line, dwell time line, conversion line, and average transaction value line.
Peter C. Verhoef et al. (2015)’s omni-channel framework requires a dashboard that does not silo channels. The channel mix stack shows revenue share by channel — store, online, marketplace, BOPIS (Buy Online, Pick up In Store), curbside, third-party delivery — trended over time. Trends in this chart are the strategic conversation: where the business is pivoting, often before leadership realises it.
flowchart LR A[Multi-Channel<br/>Parallel siloed channels<br/>Each measured separately] --> B[Cross-Channel<br/>Channels coordinated<br/>but customer chooses one] B --> C[Omni-Channel<br/>Integrated channels<br/>Customer moves seamlessly<br/>Single P and L view] style A fill:#FCE8E6,stroke:#D93025 style B fill:#FFF7E6,stroke:#F4B400 style C fill:#E6F4EA,stroke:#137333
The omni-channel view requires reconciling order, fulfilment, and revenue across channels — a join that retailers without integrated systems often cannot do. The dashboard’s existence is a forcing function for the data integration.
National roll-ups make a stuttering retailer look healthy. A 2.1 percent SSS growth at the national level can hide the fact that 38 percent of stores are negative. Always default the dashboard to store distribution — a histogram or sorted bar — with the national line as a reference. The store distribution is what drives store-manager-level conversations.
54.5 Common Pitfalls
- Dashboards refreshed weekly for daily decisions. Retail markdowns and replenishment are daily; weekly refresh kills the dashboard’s relevance.
- National-only views. Hide the variance across the network and prevent store-manager accountability.
- Silo’d channel reporting. Online, store, and marketplace dashboards owned by separate teams using different revenue definitions. Reconcile before any omni-channel view is built.
- Inventory dashboards without ageing. Same trap as Chapter 51 — days-of-supply looks healthy while half the stock is from last season.
- Basket analysis sorted by confidence, not lift. Surfaces the popular items, not the meaningful associations.
- Same-store-sales without traffic split. SSS up 4 percent: is it more shoppers (volume win) or more spend per shopper (mix or price win)? Different stories, different strategies.
- Treating BOPIS as online. BOPIS is a hybrid; counting it as either channel alone misrepresents store performance and online performance.
- Loyalty dashboards that show enrolment but not engagement. Members enrolled is a vanity metric; members active monthly is the real number.
- Markdown waterfalls without elasticity context. A 30 percent markdown that produced 8 percent unit lift looks like a problem; the same markdown on a category with shallow elasticity may have been the only inventory disposal mechanism available.
- Privacy creep on customer journey data. Loyalty and online behaviour data is sensitive; row-level security and aggregation rules are mandatory.
54.6 Illustrative Cases
Yuvijen Stores omnichannel reconciliation. Retail analytics team builds a Power BI dashboard that reconciles store, app, and BOPIS revenue against a single customer ID. The view reveals that 23 percent of customers had been double-counted — once on web, once at the store — making both channels look more independent than they are. The reconciled view shifts the marketing budget allocation between channels by 18 percent and improves overall ROI by 9 percent.
Yuvijen Stores planogram rebalance. Planogram performance treemap built in Tableau reveals that the bakery category occupies 14 percent of front-of-store space but contributes only 7 percent of the gross margin from that zone. Rebalancing toward the snack-and-beverage category — which had been space-starved — adds 3 percent to category profit within two quarters. The treemap is the chart that won the conversation.
Yuvijen Stores same-store-sales heatmap. Quarterly heatmap of SSS by store and month shows two clusters of persistent decline — six stores in metro tier-1 and four stores in tier-3 satellite towns — that the national 1.8 percent growth had hidden. Targeted store-manager interventions in the tier-3 cluster (assortment cuts, refresh of perishables) recover 4.2 percent SSS in those stores within three quarters; the tier-1 cluster proves harder and is eventually flagged for closure.
54.7 Hands-On Exercise: Build a Retail Analytics Cockpit
Aim. Build a three-page retail-analytics cockpit in Power BI that ties customer journey, inventory, and store performance to the same product and customer master, with a daily refresh. Tableau equivalents are noted.
Scenario. You are the BI lead in retail operations at Yuvijen Stores. The COO has asked for a dashboard the regional managers open every morning, that lets them see how customers are coming through, what is selling and what is not, and which stores are healthy or sick.
Deliverable. A three-page Power BI report — Customer Journey, Inventory, Store Performance — with row-level security by region, daily refresh, and mobile layouts for the regional managers’ phones.
54.7.1 Step 1 — Load and model the data
Use Get Data to load six CSVs:
-
transactions.csv— TransactionID, CustomerID, StoreID, Channel, TimestampLocal, BasketAmount, BasketUnits. -
transaction_lines.csv— TransactionID, SKU, Units, UnitPrice, MarkdownDepth. -
customers.csv— CustomerID, FirstPurchaseDate, LoyaltyTier, City. -
inventory_daily.csv— Date, SKU, StoreID, OnHand, Received, AverageCost. -
traffic.csv— Date, StoreID, FootTraffic, AverageDwellMinutes. -
journey_touches.csv— CustomerID, Touchpoint, Channel, Timestamp.
Type the columns. Build a DimDate calendar; mark it. Build a DimSKU table with Category, SubCategory, Brand, MSRP. Build a DimStore table with Region, Tier, OpeningDate. Build a RegionSecurity table for RLS.
54.7.2 Step 2 — Page 1: Customer journey
Build five visuals.
Touchpoint Sankey. Power BI Sankey visual showing flow from Awareness touchpoint → Consideration → Purchase → Post-Purchase → Loyalty. Cap touchpoints to top 10 by volume.
Path-to-purchase histogram. Histogram of touch count per converted customer. Bins 1, 2-3, 4-6, 7+.
Repeat-purchase cohort. Line chart with one line per first-purchase month, showing cumulative second-purchase percentage at month 1, 2, … 12.
Basket-association network. Force-Directed Graph visual showing top 30 product pairs by lift. Edge thickness = lift; node size = sales volume.
Loyalty funnel. Funnel showing Enrolled → Active 90-day → Active 30-day → High-Value Active.
DAX measures:
RepeatRate_30d =
DIVIDE(
CALCULATE(
DISTINCTCOUNT(transactions[CustomerID]),
FILTER(transactions,
transactions[TransactionID] IN
CALCULATETABLE(VALUES(transactions[TransactionID]),
transactions[TimestampLocal] >= TODAY() - 60
&& transactions[TimestampLocal] <= TODAY() - 30))
&& CALCULATE(COUNTROWS(transactions),
transactions[TimestampLocal] > TODAY() - 30) > 0
),
CALCULATE(
DISTINCTCOUNT(transactions[CustomerID]),
transactions[TimestampLocal] >= TODAY() - 60
&& transactions[TimestampLocal] <= TODAY() - 30
)
)
Tableau alternative: Sankey via dual-axis trick or extension; histogram via binned dimension; cohort via cohort dimension on Colour; network via dual-axis with calculated coordinates; funnel as sorted bar.
54.7.3 Step 3 — Page 2: Inventory and assortment
Build four visuals.
Sell-through heatmap. Matrix with SKU on rows, StoreID on columns, SellThroughPct as values. Conditional formatting: under 30 percent red, 30-70 amber, above 70 green.
Weeks-of-supply trend. Line chart per Category, with target band shaded between 4 and 8 weeks. Lines outside the band are flagged red.
Markdown waterfall. Power BI Waterfall visual per category showing Full Price Ticket → Markdown 1 → Markdown 2 → Markdown 3 → Write-off → Realised Revenue.
Planogram treemap. Treemap of Category and SubCategory sized by SpaceAllocation and coloured by SalesPerRunningFoot. Underperforming tiles flagged in red.
Tableau alternative: heatmap, line with reference band, waterfall via Gantt marks, treemap native.
54.7.4 Step 4 — Page 3: Store and channel performance
Build four visuals.
Same-store-sales heatmap. Matrix with Store on rows and Month on columns, cell value = SSS percent. Conditional formatting from red (negative) through neutral to green (positive).
Store distribution. Histogram of stores by SSS bucket, with national average as a reference line.
Foot-traffic / dwell / conversion / ATV. Small-multiples line chart, four panels per store: traffic, dwell, conversion, average transaction value.
Channel-mix stack. 100 percent stacked area trended monthly, with bands for Store, Online, Marketplace, BOPIS, Curbside.
Tableau alternative: heatmap native; histogram via bin; small-multiples via Trellis; stacked area native.
54.7.5 Step 5 — Daily refresh and store-manager alerts
Schedule a daily 5 a.m. refresh so the dashboard is current before the 7 a.m. store-manager call. Configure data-driven alerts:
- Any store with 3+ consecutive days of negative SSS.
- Any A-class SKU below 2 weeks of supply at any store.
- Any category where week-on-week markdown depth increases by 5+ points.
Alerts go to the regional manager via the Power BI Mobile app and a Microsoft Teams channel.
54.7.6 Step 6 — Mobile layout for regional managers
Build a mobile layout (Chapter 47) for each page with the three highest-priority visuals stacked vertically:
- Customer Journey mobile: repeat-purchase rate card, loyalty funnel, basket-association top-10 list.
- Inventory mobile: weeks-of-supply card, top-10 sell-through risks, markdown alert list.
- Store mobile: same-store-sales card, sick-store list, channel-mix card.
54.7.7 Step 7 — Row-Level Security and audit logs
Implement RLS:
- Store Manager. Sees only their own store.
- Regional Manager. Sees their region.
- National Ops. Sees everything.
- CMO/Head of Loyalty. Sees customer journey page only, with hashed customer IDs.
Test by viewing as each role; enable audit logs; document the access matrix.
Retail analytics is a stress-test of the visualisation grammar this book has been building. Heatmaps from Chapter 12 carry sell-through and same-store-sales. Sankey diagrams from Chapter 49 carry the customer journey. Network graphs from Chapter 50 (fraud) carry basket-association rules. Waterfalls from Chapter 12 and Chapter 50 carry markdown decomposition. Treemaps render planogram performance. Histograms reveal store-distribution dispersion. Mobile design from Chapter 47 puts the dashboard on the regional manager’s phone before they leave for store visits. The omni-channel reconciliation discipline forces the data integration of Chapter 24 to be done right.
Power BI three-page retail cockpit (yuvijen-stores-retail-cockpit.pbix), Tableau equivalent (yuvijen-stores-retail-cockpit.twbx), workshop dataset (yuvijen-stores-retail-data.xlsx), mobile-layout build (yuvijen-stores-retail-mobile.pbix), and a screen recording of the dashboard tour (yuvijen-stores-retail-walkthrough.mp4) will be embedded here.
Summary
| Concept | Description |
|---|---|
| Retail-Dashboard Contract | |
| Same-Day Cadence | Markdowns and replenishment are decided in hours, not weeks |
| Store-Level Default | National numbers without store-level drill are press releases |
| Inventory and Demand Joined | A demand chart without an inventory chart is half a story |
| Three Retail Jobs | |
| Customer Journey | How do customers find us, buy, and return? |
| Inventory and Assortment | What to stock, where, and when? |
| Store and Channel Performance | Which stores, channels, categories are growing or fading? |
| Customer Journey Visuals | |
| Touchpoint Sankey | Awareness through loyalty flow with link width as customer count |
| Path-to-Purchase Histogram | Touch count per converted customer reveals decisive vs considered buyers |
| Repeat-Purchase Cohorts | Per-cohort second-purchase percentage at month 1, 2, ... 12 |
| Basket Association Network | Force-directed graph of co-purchased product pairs sized by lift |
| Lift over Confidence | Lift filters real associations from popular-item noise |
| Inventory Metrics | |
| Sell-Through Percent | Units sold over units received in the period |
| Weeks of Supply | Current on-hand divided by average weekly sales rate |
| Stock-to-Sales Ratio | Beginning-of-period stock divided by sales for the period |
| GMROI | Gross margin in rupees divided by average inventory cost |
| Markdown and Planogram | |
| Markdown Waterfall | Walks full-price ticket through markdowns to realised revenue |
| Markdown Elasticity | Discount depth versus units sold reveals category price elasticity |
| Planogram Treemap | Treemap sized by space, coloured by sales-per-foot |
| Store and Channel Visuals | |
| Same-Store-Sales Heatmap | Stores by months, cell colour as SSS percent change |
| Store Distribution Histogram | Histogram of stores by SSS bucket with national average reference |
| Conversion and Dwell | Foot traffic, dwell time, conversion, ATV in four-panel small-multiples |
| Average Transaction Value | Average rupee value per transaction at the store |
| Channel Mix Stack | Revenue share by channel trended monthly as 100 percent stacked area |
| Channel Evolution | |
| Multi-Channel | Parallel siloed channels, each measured separately |
| Cross-Channel | Channels coordinated but customer chooses one |
| Omni-Channel | Integrated channels with seamless customer movement and single P-and-L |
| BOPIS as Hybrid | BOPIS counted as either channel alone misrepresents both |
| Common Pitfalls | |
| Pitfall: Weekly Refresh | Weekly refresh kills the dashboard for daily decisions |
| Pitfall: National-Only Views | Hide variance across network; prevent store-manager accountability |
| Pitfall: Silod Channels | Online, store, marketplace teams using different revenue definitions |
| Pitfall: Inventory Without Ageing | Days-of-supply looks healthy while half stock is last season |
| Pitfall: Confidence over Lift | Sorting association rules by confidence surfaces popular items |
| Pitfall: SSS Without Traffic Split | SSS up 4 percent from more shoppers vs more spend per shopper |
| Pitfall: Loyalty Vanity Metrics | Members enrolled is vanity; members active monthly is the real number |
| Pitfall: Markdown Without Elasticity | Markdown depth without elasticity context misreads disposal mechanism |
| Pitfall: Customer Privacy Creep | Loyalty and online behaviour need RLS and aggregation rules |
| Hands-On Cockpit | |
| Page 1 — Customer Journey | Touchpoint Sankey, path-to-purchase, repeat cohort, basket network, loyalty funnel |
| Page 2 — Inventory | Sell-through heatmap, weeks-of-supply, markdown waterfall, planogram treemap |
| Page 3 — Store Performance | SSS heatmap, store distribution, traffic-dwell-conversion-ATV, channel mix |
| Daily Refresh | 5 a.m. refresh before 7 a.m. store-manager call |
| Store-Manager Alerts | Sick-store, A-class WOS breach, markdown-creep alerts |
| Regional Manager Mobile | Vertical stack of three priority visuals per page on Power BI Mobile |
| Role-Based RLS | Store, Regional, National, CMO roles with separate scopes |