Metric glossary
This page collects the cross-cutting analytical concepts used across multiple P2Lab Stats reports. For specific KPI metrics, see KPI list.
Date range terms
Section titled “Date range terms”Current range
Section titled “Current range”The dates picked in the date range picker. Either a preset (last 7 / 14 / 30 days, etc.) or a custom range from the dual-month calendar.
Previous period
Section titled “Previous period”A range of equal length ending immediately before the current range starts. Used as the baseline for Δ % comparison everywhere in the plugin.
Δ % (delta percent)
Section titled “Δ % (delta percent)”(current - previous) / previous × 100. Shown next to KPI values, in some table columns, and on chart tooltips. When the previous value is 0, the UI displays —.
Exclude today
Section titled “Exclude today”A toggle that excludes today from both the current and previous range. Useful because today is partial — including it makes Δ % look artificially low until the day completes.
Order / sales terms
Section titled “Order / sales terms”AOV (average order value)
Section titled “AOV (average order value)”revenue / orders. The arithmetic mean of order totals in the range.
Revenue
Section titled “Revenue”Default: SUM(orders.amountTotal). Can be switched to net (excluding tax / shipping) under report options. Multi-currency orders are normalised to the shop default currency at the order date’s exchange rate.
COGS (cost of goods sold)
Section titled “COGS (cost of goods sold)”SUM(lineItem.quantity × purchase_price_at_order_time). Uses the historical purchase price captured in the product snapshot if available, otherwise the current purchase price.
Margin
Section titled “Margin”revenue - cogs. Displayed in currency.
Margin %
Section titled “Margin %”margin / revenue × 100. Displayed as a percentage.
Customer terms
Section titled “Customer terms”Active customer
Section titled “Active customer”A customer with at least one order in the range.
New customer
Section titled “New customer”A customer whose first-ever order falls in the range. Anchored on first-order date, not registration date.
Returning customer
Section titled “Returning customer”A customer with an order before the range start and an order in the range.
Retention rate
Section titled “Retention rate”customers_in_both_periods / customers_in_previous_period. Range-length-sensitive — comparing 7-day periods gives a different number than comparing 30-day periods.
Cohort
Section titled “Cohort”A group of customers identified by their first-order month. The cohort matrix tracks how many of them return in M+1, M+2, … months.
RFM terms
Section titled “RFM terms”Quintile score
Section titled “Quintile score”The customer base ranked on Recency / Frequency / Monetary, split into 5 equal-size buckets. Score 5 = top quintile (best); score 1 = bottom quintile (worst).
Recency
Section titled “Recency”Days since the customer’s last order in the range. Smaller is better.
Frequency
Section titled “Frequency”Number of orders in the range. Bigger is better.
Monetary
Section titled “Monetary”Total spend in the range. Bigger is better.
See RFM segments for how (R, F, M) triples map to named segments.
Cross-sell terms
Section titled “Cross-sell terms”Support
Section titled “Support”Share of orders that contain both products in a pair. count(orders_with_both) / count(all_orders_in_range).
Confidence
Section titled “Confidence”Given that an order contains product A, the probability it also contains B. count(orders_with_both) / count(orders_with_A).
How much more likely the pair is than chance. confidence / support(B). Lift > 1 = positive association; lift = 1 = independent; lift < 1 = negative association.
Stock terms
Section titled “Stock terms”Days of supply
Section titled “Days of supply”current_stock / (units_sold_in_range / days_in_range). How many days the current stock would last at the recent sales velocity.
Velocity
Section titled “Velocity”units_sold_in_range / days_in_range. Average daily units sold.
Depletion risk
Section titled “Depletion risk”A flag set when days_of_supply < threshold (configurable). Used to surface products that will run out before they can be restocked.
Dead stock
Section titled “Dead stock”Products with zero sales in the range and stock > 0. Flags capital tied up in non-moving inventory.
Overstock
Section titled “Overstock”Products with days_of_supply > overstock_threshold (configurable). Flags excess inventory relative to demand.
Snapshot terms
Section titled “Snapshot terms”Snapshot
Section titled “Snapshot”A row in the p2lab_stats_product_snapshot table capturing a product’s price and stock at a point in time. Captured daily, idempotent per day, retained for the configured period.
Cost change
Section titled “Cost change”Difference between the purchase price in two snapshots. Used by the Margins → Cost pressure view to surface products with rising costs.
Related
Section titled “Related”- KPI list — every metric, defined and located
- RFM segments — the segment mapping
- Reports overview