The Money Locked Up in Your Warehouses Without You Knowing
Stockouts cost companies an average of 7.4% of their potential sales. At the same time, excess inventory ties up capital, drives storage costs and ends in deterioration or write-off. They are two opposite problems that coexist in the same company, in the same period, often in the same warehouse. And both have the same origin: replenishment decisions made without reliable real-time data. QlikSense inventory management exists to solve exactly that: giving you complete, continuous visibility of what you hold, what moves and what is dying on your shelves.

What I am about to show you is not supply chain theory. It is the concrete implementation, with real expressions and dashboard structure, that I use when working with manufacturing and distribution companies that want to turn stock management into a competitive advantage.
The Real Problem: Intuition vs Data in Inventory Management
Most midsize companies manage their inventory with some combination of ERP, Excel and the warehouse manager's experience. The problem is not that their data is bad: it is that the data they have is not integrated, not updated in real time, and does not produce automatic alerts when something falls outside the expected range.
You know the outcome well:
- Dead stock nobody noticed until year-end close: immobilized capital generating no return
- Stockouts on A items that cost you the sale and damage the customer relationship: the most invisible cost in inventory
- Reactive rather than preventive replenishment: the buyer orders when the shelf is empty, not when the analysis says it is time to order
- Turnover indicators calculated once a month (when they should be calculated daily)
According to recent data, only 23% of small and midsize companies have invested in advanced analytics for inventory management. That creates a direct competitive advantage for whoever does: stock intelligence is not a marginal differentiator, it is a capital multiplier.
QlikSense Inventory Management: The 4 Indicators You Cannot Skip
Before building the dashboard, define the indicators that genuinely move the needle in your operation. For manufacturing and distribution, these four are fundamental:
- Inventory Turnover: how many times a year you sell (and replenish) your average stock. Low turnover = immobilized capital.
- Days Inventory Outstanding (DIO): how many days you can operate on current stock without replenishing. Alert when it exceeds the supplier's lead time.
- Stock Coverage: projected run-out date per item based on average consumption. Detects stockouts before they happen.
- Dead Stock Index: share of inventory with no movement in the last 90 days (or whatever period you define). Capital that has stopped working.
Step 1: Load Script — Calculating Turnover and Dead Stock in the Data Model
Some indicators are better calculated in the load script than in dashboard expressions. Turnover and dead stock are two of them, because they require fixed-period logic.
// ===== TABLA DE MOVIMIENTOS DE INVENTARIO =====
Movimientos_Inventario:
LOAD
Codigo_Producto,
Fecha_Movimiento,
Tipo_Movimiento, // 'ENTRADA', 'SALIDA', 'AJUSTE'
Cantidad,
Costo_Unitario,
Bodega
FROM [lib://SAP_Data/Movimientos_Stock.qvd] (qvd);
// ===== TABLA DE STOCK ACTUAL =====
Stock_Actual:
LOAD
Codigo_Producto,
Bodega,
Cantidad_Disponible,
Fecha_Ultimo_Movimiento,
Costo_Unitario_Actual,
// Stock muerto: sin movimiento en 90 días
If(
Fecha_Ultimo_Movimiento < AddDays(Today(), -90),
'Stock Muerto',
If(
Fecha_Ultimo_Movimiento = AddDays(Today(),-90),
Cantidad, 0)) / 90 AS Consumo_Diario_Promedio,
// Días de inventario en mano (DIO)
// Se calculará en el dashboard con el stock actual
RESIDENT Movimientos_Inventario
GROUP BY Codigo_Producto, Bodega;
// ===== MASTER CALENDAR PARA ANÁLISIS TEMPORAL =====
MinFecha:
LOAD Min(Fecha_Movimiento) AS MinDate RESIDENT Movimientos_Inventario;
MaxFecha:
LOAD Max(Fecha_Movimiento) AS MaxDate RESIDENT Movimientos_Inventario;
LET vMinDate = Peek('MinDate', 0, 'MinFecha');
LET vMaxDate = Peek('MaxDate', 0, 'MaxFecha');
DROP TABLE MinFecha, MaxFecha;
Calendar:
LOAD
Date($(vMinDate) + IterNo() - 1) AS Fecha_Movimiento,
Year($(vMinDate) + IterNo() - 1) AS Año,
Month($(vMinDate) + IterNo() - 1) AS Mes_Nombre,
Month($(vMinDate) + IterNo() - 1) AS Mes_Num,
'S' & Week($(vMinDate) + IterNo() - 1) AS Semana,
QuarterName($(vMinDate) + IterNo() - 1) AS Trimestre
AUTOGENERATE 1
WHILE $(vMinDate) + IterNo() - 1 <= $(vMaxDate);Step 2: Set Analysis for Comparative Stock Analysis
Set Analysis expressions let you compare the state of inventory across different periods without changing the active selections. That is key for analyses such as «what was in stock 30 days ago versus today».
// ===== EXPRESIONES PARA EL DASHBOARD =====
// Valor total del stock actual (respeta selecciones de Bodega y Producto)
Sum(Valor_Stock)
// Valor del stock MUERTO (sin movimiento 90 días)
Sum({$<Clasificacion_Stock={'Stock Muerto'}>} Valor_Stock)
// % del total que está inmovilizado
Num(
Sum({$<Clasificacion_Stock={'Stock Muerto'}>} Valor_Stock)
/ Sum(Valor_Stock),
'#,##0.0%'
)
// Días de Inventario en Mano (DIO) — promedio ponderado
Avg(
If(
Consumo_Diario_Promedio > 0,
Cantidad_Disponible / Consumo_Diario_Promedio,
Null() // Excluye productos sin movimiento del promedio
)
)
// Rotación anualizada de inventario
// Costo de ventas anualizado / Valor promedio del stock
Sum({$<Tipo_Movimiento={'SALIDA'}, Año={$(=Max(Año))}>} Cantidad * Costo_Unitario)
/ Avg(Valor_Stock)
// Cobertura de stock (días hasta agotamiento)
// Para tabla de alertas por producto
If(
Consumo_Diario_Promedio > 0,
Cantidad_Disponible / Consumo_Diario_Promedio,
9999 // Valor alto para productos sin consumo (no son quiebres potenciales)
)
// ALERTA: Productos en riesgo de quiebre (cobertura 0
AND (Cantidad_Disponible / Consumo_Diario_Promedio) < Lead_Time_Dias,
Codigo_Producto
)
)Breaking down the key expressions:
{$<Clasificacion_Stock={'Stock Muerto'}>}: applies the classification filter inside the current set, respecting active Warehouse and Product selectionsDISTINCT If(...)inside Count(): counts only the unique products that meet the alert conditionNull()in the DIO: explicitly excludes items with no consumption from the average calculation, so they do not distort the indicator
Step 3: Inventory Dashboard — Visual Structure
The inventory management view in QlikSense should have three clearly separated zones:
- Alert Zone (top): 4 KPIs with traffic lights — Total Stock Value, % Dead Stock, Items at Risk of Stockout, Average DIO. Each with its alert threshold configured via variable.
- Analysis Zone (center):
- Stacked bar chart: stock distribution by classification (Active / Slow / Dead) by product family
- Scatter plot: DIO on the X axis, stock value on the Y axis. Items in the upper right quadrant are the priority: a lot of capital tied up and many days of coverage. They are the candidates for discounting or liquidation.
- Action Zone (bottom): A table of the 20 items at highest risk of stockout (coverage < lead time), sorted from lowest coverage upward. This table is the direct input for the purchasing team.

Step 4: Automatic Alerts — QlikSense Alerting
The reactive dashboard (I open the app and see the status) is the first level. The proactive dashboard (the system tells me when something falls out of range) is where the real value sits.
// Configuración de Alertas en QlikSense Alerting
// (disponible en QlikSense Cloud y Enterprise)
// Alerta 1: Quiebre inminente
Nombre: "Alerta Quiebre Inminente"
Condición: Count({$} DISTINCT If(
Consumo_Diario_Promedio > 0
AND (Cantidad_Disponible / Consumo_Diario_Promedio) < Lead_Time_Dias,
Codigo_Producto)) > 0
Frecuencia: Diaria (después del reload de datos)
Destinatarios: jefe_compras@empresa.com, gerente_operaciones@empresa.com
Mensaje: "Hay [valor] producto(s) con cobertura inferior al lead time del proveedor.
Revisar tabla de reposición urgente."
// Alerta 2: Stock muerto supera el umbral
Nombre: "Stock Muerto Alto"
Condición: Sum({$<Clasificacion_Stock={'Stock Muerto'}>} Valor_Stock) /
Sum(Valor_Stock) > 0.15
Frecuencia: Semanal (lunes 8 AM)
Destinatarios: gerente_finanzas@empresa.com, gerente_operaciones@empresa.com
Mensaje: "El stock muerto supera el 15% del valor total del inventario.
Se requiere revisión de política de liquidación."Alerts turn QlikSense from a query tool into an active management system. The purchasing team does not need to open the dashboard every day: the dashboard tells them when there is something to do.

Business Impact: The Capital You Get Back
A distribution company with inventory valued at $2,000,000 and 18% dead stock has $360,000 tied up generating no return. With the right visibility in QlikSense, that figure can drop to 5-8% within 6 months: between $200,000 and $260,000 freed up for reinvestment.
On the stockout side, advanced analytics can cut them by up to 25%. If your company loses 5% of its sales to stockouts and your annual revenue is $10,000,000, you are leaving $500,000 on the table every year. A 25% reduction recovers $125,000 a year, purely by improving replenishment visibility.
And that is before counting the drop in rush-order costs, the discounts you no longer have to give to clear excess, and the savings in storage space.
Common Mistakes in Inventory Analytics
Best Practices From Real Operations
- Integrate QlikSense directly with your ERP: If you are on SAP Business One, the QVDs for stock movements and balances are available via ODBC or APIs. The data model has to reflect the state of the ERP in real time (or close to it). A dashboard running on yesterday's data will not catch stockouts in time.
- Build one view per warehouse AND a consolidated view: The warehouse manager needs to see their own operation. The operations manager needs to see the total. Design two layers of the same app: one with a fixed filter by the user's warehouse (Section Access) and another with a global view for managers.
- Bring purchasing into the dashboard design: They are the ones who will use the stockout alert table. If the table does not speak their language (supplier name, date of last order, most recent cost price), they will not use it. You handle the technical design. The user handles the functional validation.
- Measure the impact before and after: Before implementing the dashboard, establish the baseline: how many stockouts per month? what is the value of dead stock? how many rush orders are placed at a premium? Those figures are the ROI of your BI project.
Conclusion: Inventory Is Not a Warehouse Problem, It Is an Information Problem
When I visit companies with inventory problems, the pattern is always the same: the data exists, the intelligence does not. They have an ERP, they have movements, they have balances. What they do not have is the integrated view that turns that data into decisions about replenishment, liquidation and supplier negotiation.
QlikSense inventory management does not replace the warehouse manager's judgment or the buyer's experience. It amplifies them. It gives them what they need to act before the problem becomes visible: projected coverage, dynamic stock classification and automatic alerts that do not depend on someone remembering to check the system.
The capital locked in your warehouses does not have to stay there. The data to release it already exists. You just need the right tool to see it.
Want to explore more digital transformation strategies for production companies? Visit hectorpincheira.com and get strategic content on technology applied to the business.




