Dashboard · Fashion retail

Store Stockout Bulletin

Every week, store managers and coordinators need to know two things: which products are missing in each store, and which of those gaps can be fixed right now because the distribution center has stock.

Power BI · DAX · SQL · VBAWeb replicaFictional data
Fictional data · 20 stores · 80 SKUs
Total stockout (1 day)…
Actionable stockout…
Store-SKUs to replenish now…
Lost potential sales (7 days)…

Stockout by week: total and actionable

Stockout by store

Stockout by product line

5 lagging stores (highest stockout)

StoreChannelStockoutReplenishVs prev. week

5 leading stores (lowest stockout)

StoreChannelStockoutReplenishVs prev. week

The problem

A fashion retail chain tracked store stockouts in spreadsheets. The overall number existed, but it did not answer the question that matters for replenishment: of these gaps, which ones can I fix this week?

If the product ran out in the store and in the distribution center too, there is no point pushing the replenishment team. If it ran out in the store while stock sits in the distribution center, that is a replenishment failure that can be fixed now.

The solution

A weekly bulletin in Power BI, fed by a dataset prepared with SQL and VBA, built on three ideas:

  1. Total stockout: the share of store-SKU combinations at zero on the day of the stock snapshot.
  2. Actionable stockout: the same calculation, only for SKUs that have stock in the distribution center. This is the part replenishment can solve.
  3. Store ranking: lagging and leading stores of the week, so coordinators know where to act first.

The filters follow the way the business looks at the operation: channel (company-owned or franchise), product line (new in, core, basics and seasonal), region and manager. Products being phased out are left out, so items that will not be replenished do not inflate the stockout.

The main DAX measures

-- % of store-SKUs at zero, only among items the store has already received
% Ruptura 1D =
AVERAGEX(
    FILTER( Ruptura, Ruptura[ESTOQUE_RECEBIDO] = "RECEBIDO" ),
    Ruptura[RUPTURA_1D]
)

-- Same calculation, only where the distribution center has stock to replenish
% Ruptura Tratável =
CALCULATE( [% Ruptura 1D], Ruptura[ESTOQUE_TRATAVEL] = "TRATAVEL" )

-- Lost potential sales: days out of stock x the SKU's sales potential in the store
Valor Ruptura 7D =
SUMX( Ruptura, Ruptura[RUPTURA_7D] * Ruptura[POTENCIAL] )

Measure and column names are in Portuguese, as in the original model.

The result

The bulletin went out every week to store managers and coordinators, with the same criteria for every store, and sped up replenishment priorities for company-owned stores. The goal is to replace "stockout is high" with "these stores have these SKUs at zero while the distribution center has stock".

About this page: the original version runs in Power BI with the company's internal data, which cannot be published. This is a faithful replica of the logic, built in HTML and JavaScript, with 20 stores and 80 fictional products generated in the browser.