Open to Business Analyst roles · UK right to work · Remote

I build the tools, not just the reports.

I’m a Business Analyst who turns large, messy commercial datasets into automated reporting and clear, actionable insight. Most of my work starts with a recurring manual task, such as a weekly reconciliation, a monthly review or a planning spreadsheet, and ends with a tool that does it reliably in one run.

Qlik Sense sales dashboard with KPI tiles, retailer comparison, monthly trend and regional split
  • Qlik Sense
  • Set analysis
  • Python
  • pandas
  • OR-Tools
  • OSRM
  • openpyxl
  • xlsxwriter
  • Excel
  • VBA
  • Pivot tables
  • SAP exports
  • Power BI
  • SQL
  • Dynamic programming
  • Forecasting
Built
9end-to-end tools, each replacing a manual job
Platforms
3Qlik Sense, Python and Excel/VBA
Scale
138k+transaction rows behind one dashboard
Education
BComEconomics, University of Pretoria
Selected work

Nine tools, each built to replace a manual job.

Each case study walks through the problem, what I built, how it works, the code that matters and what changed. Every screenshot is rebuilt on synthetic data.

Case study 01 of 09

Sales Performance Dashboard

  • Qlik Sense
  • Qlik Sense
  • Data Modelling
  • Set Analysis
  • QVD

One Qlik sheet that behaves like fifty static reports, built from 138,000+ rows of raw transactions.

The problem

Commercial teams were working from a library of static reports: one per retailer, per measure, per period. Each answered a single question, none of them agreed perfectly with the others, and every new question meant building another report.

Underneath sat a raw transactional extract of more than 138,000 rows across 37 columns, with no calendar logic and no consistent way to compare this year with last year or this month with the same month a year ago.

What I built

An end-to-end Qlik Sense dashboard built from 138,000+ rows of raw transactional data: custom extract layer, data model, financial-year calendar logic and every expression built from scratch. One control set switches every KPI, chart and title between Volume, Value and Store Count across YTD, financial year, month-to-date or any custom date range.

How it works
  1. Extract layer

    The raw transactions are loaded through a custom extract into QVD files, so reloads are fast and the model always reads a clean, typed source.

  2. Data model

    Transactions are linked to customer, region, product, factory and rep dimensions, so any field on screen can filter every chart.

  3. Calendar

    An auto-generated date spine carries financial-year logic (the year starts on 1 March) and pre-computed YTD, MTD, FYTD and prior-year flags.

  4. Variables

    The active measure (Value, Volume or Store Count) and the active period (YTD, FY, MTD or a custom range) live in variables that every expression reads.

  5. Dynamic titles

    A single expression writes every chart heading from the current selections, so the labels can never disagree with the numbers.

Inside the build · 7 views
01/07The full dashboard on synthetic demo data: sales value, volume and store count with year-on-year variance, retailer comparison, monthly trend and regional split. Everything on screen responds to a single click.
02/07Select a retailer and the entire sheet follows. Every chart re-filters and every title rewrites itself (‘Retailer 2 – Sales Value (YTD)’), driven by expressions, not labels.
03/07The same selection at product level: current year vs prior year for every SKU in the retailer’s range, with the regional mix updating alongside.
04/07One control set drives the whole page: three measures × four time intelligences, handled by variables rather than duplicated charts.
05/07A custom date-range picker built with native controls and helper variables. Pick any window (here, five and a half years) and the KPIs, titles and comparisons recalculate against the matching prior period.
06/07The custom calendar script: an auto-generated date spine with financial-year logic and YTD / MTD / FYTD comparison flags computed at load time.
07/07The dynamic title expression, the pattern that makes one sheet behave like a report library.
The code that matters
=If(GetSelectedCount([Customer])>0,
    GetFieldSelections([Customer]) & ' - ',
    If(GetSelectedCount([Region])>0,
        GetFieldSelections([Region]) & ' - ',
        'All Customers - '
    )
) & Pick(Match($(vMeasure),'Value','Volume','Store Count'),
    If(vPeriod='''Custom''', Date(vStartDate,'DD/MM/YY') & ' - ' & Date(vEndDate,'DD/MM/YY'),
        PurgeChar(vPeriod,'''')) & ' Sales Value (R)',
    If(vPeriod='''Custom''', Date(vStartDate,'DD/MM/YY') & ' - ' & Date(vEndDate,'DD/MM/YY'),
        PurgeChar(vPeriod,'''')) & ' Sales Volume (KG)',
    If(vPeriod='''Custom''', Date(vStartDate,'DD/MM/YY') & ' - ' & Date(vEndDate,'DD/MM/YY'),
        PurgeChar(vPeriod,'''')) & ' Store Count')
Outcome

Why it matters

  • Nothing on this sheet is static. Titles, measures and periods are all variable-driven expressions. One sheet behaves like fifty pre-built reports, and the date intelligence (year-on-year, MTD, FYTD) is computed once at load time so every chart inherits it for free.

Result

  • 138,000+ rows of raw transactions turned into one sheet that replaces a library of static reports.
  • Any retailer, region, product or rep view is one click away, with year-on-year comparisons built in.
  • Every chart shares one set of date flags, so figures agree across the whole page.
↑ All case studies
Case study 02 of 09

Automated Reporting Suite

  • Qlik → Excel + VBA
  • Qlik Reporting
  • Excel
  • VBA
  • Pivot Automation

Retailer reviews generated from the live Qlik model, in a workbook where one dropdown re-filters every pivot.

The problem

Quarterly retailer reviews and a long list of recurring weekly and monthly reports were produced by hand: export from the BI tool, paste into Excel, rebuild the pivots, format, then email. The same workbook was effectively rebuilt once per retailer.

Every manual step was a chance for a figure to drift, and the time went into production instead of reading the numbers.

What I built

Quarterly retailer reviews generated from the Qlik data model into formatted Excel and distributed on a click. The workbook itself is interactive: one dropdown re-filters every pivot table on every sheet simultaneously via VBA, so one file behaves like a separate report per retailer. Similar automated reporting runs monthly for QSR clients from raw point-of-sale data.

How it works
  1. Template on the live model

    Report templates are bound to the Qlik app, so every output is generated from the current data, never from a pasted copy.

  2. Scheduled distribution

    Reports go to the stakeholder list on a schedule or on demand, with no manual export step.

  3. One source sheet

    Every pivot in the workbook reads the same source sheet, so the summary, regional detail and store counts always reconcile.

  4. One control

    A validated dropdown in cell B4 holds the selected retailer.

  5. Workbook-wide macro

    A Worksheet_Change event walks every pivot table on every sheet and aligns its filter to the selection, with smaller accounts grouped under ‘Other’.

Inside the build · 6 views
01/06The quarterly review: month-by-month and quarter totals with prior-year variance across volume and value, every pivot fed from one source sheet.
02/06Same sheet, different retailer, one click apart. The entire workbook re-filters to the selection.
03/06The single control that drives it: a validated dropdown wired to a worksheet-change event.
04/06The macro behind it: a Worksheet_Change trigger loops every PivotTable in the workbook and aligns its filters to the selection. The same pattern works on any dimension.
05/06Depth behind the summary: distinct store participation by region and product, current vs prior year, with variance flags. The ranging conversation in one sheet.
06/06Report templates live against the Qlik app. Output generates from the live model and distributes to the stakeholder list on schedule or on demand.
The code that matters
Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Address = "$B$4" Then
        Dim selectedValue As String: selectedValue = Target.Value
        Dim otherList As Variant
        otherList = Array("RETAILER 1", "RETAILER 2", "RETAILER 3", _
                          "RETAILER 4", "RETAILER 5", "RETAILER 6", "OTHER")
        For Each ws In ThisWorkbook.Worksheets
            For Each pt In ws.PivotTables
                For Each pf In pt.RowFields
                    If pf.Name = "Sub Customer" Then
                        pf.ClearAllFilters
                        For Each pi In pf.PivotItems
                            If selectedValue = "OTHER" Then
                                pi.Visible = IsInArray(pi.Name, otherList)
                            Else
                                pi.Visible = (pi.Name = selectedValue)
                            End If
                        Next pi
                    End If
                Next pf
            Next pt
        Next ws
    End If
End Sub
Outcome

Why it matters

  • The macro is field-agnostic and workbook-wide. A single cell change walks every pivot on every sheet and aligns it to the selection, including a grouped ‘Other’ bucket. Non-technical users get a multi-retailer interactive report with zero training, and distribution is one click from the live Qlik model.

Result

  • 25 monthly and 13 weekly reports automated.
  • Several days of manual report production removed every month.
  • One interactive file replaces a separate workbook per retailer.
↑ All case studies
Case study 03 of 09

Multi-Day Call-Cycle Optimiser

  • Python + OR-Tools + OSRM
  • Python
  • Google OR-Tools
  • OSRM
  • Clustering
  • Dynamic Programming

Plans a rep’s full territory into a multi-week cycle, deciding when an overnight stay beats driving home.

The problem

A field rep covers a territory of around 300 stores, from dense metro clusters to towns several hours’ drive away. Call cycles were planned by hand.

Manual plans meant long empty drives, small towns split across different days and revisited later, and no principled way to decide when a hotel night was worth paying for.

What I built

A planner that turns a store list into a complete call cycle: which stores on which day, in what order, whether the rep goes home or stays out, and which far-away stores roll to the next cycle. Road times come from a self-hosted OSRM routing server, and the day-building runs on Google OR-Tools.

How it evolved

The first version built one giant tour through every store, then a dynamic programme split that tour into days, pricing ‘drive home’ against ‘sleep near the last stop’ for every possible day. That split is provably optimal for a given tour, and on a 28-store test it produced a clean four-day plan of 722.9 km with every day inside the 9-hour cap.

At full-territory scale the tour itself became the problem: the split landed wherever the line happened to be, so a town could be cut in half and revisited days later, and about fifteen tuning constants existed only to patch that. The rewrite plans in the right order instead. Decide what is far first, build the overnight trips, then partition everything else into home days.

How it works
  1. Matrix

    Real road time and distance between every pair of stores, from a self-hosted OSRM server, cached against a hash of the coordinates.

  2. Towns and classify

    Stores a few minutes apart are welded into towns. Each town or lone store is then either day-reachable from home or ‘far’ (more than 105 minutes one way), and far stores are only ever visited on an overnight trip.

  3. Trips

    Far stores are clustered into regional swings. The night budget is spent on the swings that save the most driving per night, and the rest are deferred whole to the next cycle.

  4. Corridor

    Day-reachable stores that sit on the drive out or back are folded onto a trip, so the long commute is never driven empty.

  5. Partition

    One OR-Tools vehicle-routing solve splits the remaining stores into home days, each inside the work window.

  6. Repair and polish

    Split towns are pulled back onto one day, a home day may not span two unrelated areas, thin days are merged where they fit, and a local pass moves a store to a neighbouring day when that cuts total driving.

  7. Schedule and export

    Swings are spread between runs of home days, each day’s stop order is optimised, and the workbook gets a summary with flags for outlier or over-window days, a tab per day, and a list of stores deferred to the next cycle.

Inside the build · 7 views
01/07The SUMMARY sheet and the run report. Twenty-seven days, each with its type, stores, driving, total work hours and where the rep sleeps. Two overnight swings (shaded) sit between runs of home days, and the 8 hotel nights match the cycle's 8-night budget exactly. The Flag column is empty because no day failed the outlier or over-window checks. The tab strip shows every sheet the tool writes: one per day plus the stay-out list.
02/07A schematic of the same plan on a synthetic plane (no real geography). Home days fan out inside the roughly 105-minute day-trip limit. The long swing picks up corridor stores on its way out, hotel-hops the far belt and comes back once. The short swing spends its single night on a far town. Belts the night budget could not fund sit outside, untouched, ready for next cycle.
03/07Every day measured against its window: drive time plus 36 minutes per store. Home days stop below 9.0 hours, which is the 9.5-hour day less lunch. Touring days may run to 9.75 hours because there is no commute home. Close-in days are mostly service time, and the far home days at the end carry more driving and fewer stores.
04/07Two home-day sheets. Day 1 is a dense cluster close to home: ten stops, mostly short hops. Day 23 is three stores in one remote town, about two hours out and back. It stays a short day on purpose, because the day-span cap stops the solver from bolting it onto an unrelated area. GPS columns are blurred.
05/07The start of the long swing. Day 6 leaves home, works a corridor of stores on the way out and sleeps near its last stop. Day 7 departs from that hotel, not from home, and its ‘Overnight near’ row costs zero kilometres because tomorrow starts there.
06/07How a swing ends. Day 12 tours the far belt. Day 13 is the single drive back, collecting a town on the way and stopping at near-home stores just before arriving. The one-night swing below drives out to a far town on Day 19, then on Day 20 reaches one more far store and calls at a single store on the long road home.
07/07STAY_OUT_NEXT: the 62 stores this cycle could not fund. They are listed belt by belt, so next cycle's swing starts from a ready-made list. The last two rows are near-home stores from a town that could not fit whole on any home day. The planner defers them openly instead of splitting the town.
The code that matters
def is_far(s, time_mat):
    one_way = time_mat[0][s]                       # minutes from home
    return (one_way > DAYTRIP_MAX_ONEWAY           # 105 min: never day-tripped
            or 2 * one_way + SERVICE_TIME > WORK_BUDGET)

def town_is_far(group, time_mat):
    # a town (stores a few minutes apart) is classified as ONE unit
    near_edge = min(time_mat[0][s] for s in group)
    if near_edge > DAYTRIP_MAX_ONEWAY:
        return True
    far_share = sum(is_far(s, time_mat) for s in group) / len(group)
    return far_share >= TOWN_FAR_FRACTION           # half far -> whole town on a swing
Outcome

Why it matters

  • The overnight decision is economic. A night is only funded if it saves at least 60 minutes of driving compared with day-tripping the same stores, and the cycle has a hard cap on total hotel nights.
  • Towns are never split. Stores within a few minutes of each other are welded into one unit before any day is built.
  • The routing server is self-hosted OSRM. That removes per-request API costs entirely, and chunked requests get past the default coordinate limit, so the matrix can be any size at zero spend.

Result

  • Full-territory run: 239 of 301 stores planned into a 27-day cycle, 5,355 km, with all 8 budgeted hotel nights used and every day inside its working window.
  • The remaining 62 far stores are listed belt by belt for the next cycle, not dropped silently.
  • Verified first-version run: 28 stores, 4 days, 722.9 km, every day inside the 9-hour cap.
↑ All case studies
Case study 04 of 09

Replenishment Order Audit

  • Python
  • Python
  • pandas
  • openpyxl
  • SAP exports

Finds duplicate purchase orders and stock pushed into stores that already have months of cover.

The problem

Auto-replenishment was raising duplicate purchase orders and pushing stock into stores already holding weeks of cover. Order volumes made manual checking impossible, so nobody could say how often it happened, where, or on which products.

What I built

This audit ingests a month of daily order reports and stock-on-hand snapshots, de-duplicates PO lines across snapshots, and flags duplicate live POs, orders into stores above 30/60/90 days’ cover, dead stock, and repeat-offender stores, all into a colour-flagged workbook ready for the supplier conversation.

How it works
  1. Parse the exports

    Each daily SAP export is read by locating its header row and columns by name, so layout drift does not break the run.

  2. De-duplicate snapshots

    The same PO appears in many daily reports. Lines are keyed on PO, store, product and delivery date, and the latest status wins.

  3. Find live duplicates

    Two live POs for the same store, product and delivery date form a duplicate group. A dropped PO (confirmed = 0) that was legitimately re-raised does not.

  4. Judge cover on the day

    Each order is matched to the stock snapshot from its own raising date, and days of cover come from stock on hand divided by the daily rate of sale.

  5. Flag and summarise

    Orders into stores above 30, 60 or 90 days’ cover, dead stock (stock on hand, zero sales) and stores over-supplied on two or more dates go into a colour-flagged workbook.

Inside the build · 5 views
01/05The Summary sheet: one run of 1,801 distinct order lines gives 8 duplicate groups and 131 orders into stores already above 30 days' cover, 80 of them above 90 days. The counts are tiered by existing cover, dead stock is split out, and 20 stores turn up as repeat offenders. The notes alongside read those numbers.
02/05Duplicate Orders: every group of POs for the same store, article and delivery date. A dropped PO (confirmed = 0) stays visible but never counts, so a group is only flagged when two or more live POs remain.
03/05Over Supplied, first half: dead-stock lines (stock on hand, no sales in the window) first, then orders sorted by days of cover on the day the PO was raised. One case of a slow line adds more than 700 days of cover.
04/05Over Supplied, second half: the rest of the 131 flagged lines, down to the 30-day threshold. Days cover is shaded red above 90 days and amber from 60 to 90.
05/05Every header carries a filter. Picking one store from the Store filter shows the same pattern on four separate order dates, which is exactly what the summary's repeat-offender count measures.
The code that matters
hrow = next(i for i, r in enumerate(rows)
            if r and any(str(c).strip() == "P.O Number" for c in r))
qrow = hrow - 1   # quantity labels sit one row ABOVE the header in this export

H = [str(c).strip() for c in rows[hrow]]   # find every column by name,
Q = [str(c).strip() for c in rows[qrow]]   # never by fixed position
Outcome

Why it matters

  • Two details show judgement, not just code. A PO that was dropped (confirmed = 0) and legitimately re-raised is deliberately not flagged as a duplicate, because the audit understands the process it is checking. And each order is judged against the stock snapshot from its own raising date, not today’s stock, so the flag reflects what the system knew when it ordered.

Result

  • A control that did not previously exist: order volumes had made manual checking impossible.
  • A month of orders audited in one run, with duplicates, over-supply tiered at 30, 60 and 90 days' cover, dead stock and repeat-offender stores in one workbook.
  • Findings arrive as a workbook ready for the supplier conversation.
↑ All case studies
Case study 05 of 09

QSR Monthly Review Generator

  • Python
  • Python
  • pandas
  • xlsxwriter
  • POS data

An eight-sheet monthly client review built from raw till data, with charts beside every table, month pickers and a slicer, and a written read of each sheet. Every line is compared with its prior three-month average and the same month last year.

The problem

A quick-service restaurant client needed a monthly trading review: what sold, through which channel, on which days and at which hours, and whether the month’s specials actually worked.

The till system exports one wide sheet with a column per date, so every review meant hours of reshaping and pivoting before any analysis could start. A single month-on-month comparison also misled: one unusual month made everything after it look like growth or decline.

What I built

One script turns the raw point-of-sale PLU export into an eight-sheet review. It finds the review month on its own and compares every figure two ways: against the average of the prior three months, for the recent run-rate, and against the same month last year, for seasonality. It covers headline units and main meals by channel, category and product tables with a comparison chart for each, a 13-month trend, day-of-week and hour-of-day patterns, and a specials sheet where each promotion is judged only against its own history. The finished workbook then gets its interactive layer and its written analysis: a category slicer on the trend, Choose Month pickers on the daily and hourly sheets, and commentary beside the tables on every main sheet.

How it works
  1. Reshape

    The wide till export is checked for its essential columns, then melted into one row per product, per day, per hour.

  2. Clean names

    Till PLU names are mapped to clean menu names and categories. A new special only needs one line added to the category lookup to appear on the specials sheet.

  3. Channel

    Every sale is classified as instore or delivery from keywords in its till description.

  4. Pick the periods

    The review month is the latest complete month in the export. A part-month is skipped automatically, and the prior three months and the same month last year follow from it. A one-line override exists for re-runs.

  5. Compare honestly

    Where a product has no sales history in a comparison period the cell is left blank, not zero, so a new menu line never shows a fake +100% or −100%.

  6. Patterns

    Day-of-week and hour-of-day sheets compare each slot’s share of units across the three periods, followed by month-by-month blocks for the last 13 months.

  7. Write

    An eight-sheet workbook with a native Excel comparison chart beside every category table, red and green variance formatting and frozen headers, named for the month it covers.

  8. Make it interactive

    A Category slicer filters the monthly trend and its chart. On the daily and hourly sheets a Choose Month list picks any of the last 13 months; MATCH finds its position and INDEX(CHOOSE(...)) pulls that month’s block into the chart.

  9. Write the read

    Each main sheet gets written commentary beside its tables: what moved, by how much against both baselines, and where to look next.

Inside the build · 7 views
01/07The Summary sheet as the client receives it. Headline units and main meals by channel, every category against the June-August run-rate and last September, a Units by Category chart beside the tables, the written read of the month, and the top five growers and decliners against both baselines. The insight sits next to the numbers: delivery is now 42.7% of volume, Saturday collapsed, and the Main Meals line understates the business because the fastest-growing product is not counted in it.
02/07Total Sales: every category gets its own product table, a comparison chart and a written paragraph. Stews show the structural decline, Grill the steady growth, and Light Meals reveals itself as a single-product category. Instore Sales and Delivery Sales repeat the same layout for each channel.
03/07Delivery Sales, the same build filtered to one channel. Its commentary carries the month's main story: the Street Wrap now goes out almost entirely on delivery, and delivery Sides are up by half on last year as customers build bigger baskets.
04/07Monthly Trend: 21 months of units by category, with a Category slicer driving both the table and the line chart. Here it is set to the four categories that tell the mix story: Stews falling from 37% of volume to 25% while Grill, Light Meals and Sides take its place. Selecting Grand Total and Main Meals instead shows the headline lines. The commentary underneath reads the whole period.
05/07Daily Trend. Each day's share of units is compared across the three periods, so months of different size sit side by side. The Choose Month picker (shown open) redraws the second chart from any of the last 13 months: the choice is matched against a hidden month list, and INDEX(CHOOSE(...)) pulls that month's block from the detail tables below. The commentary normalises for the number of trading days before calling Saturday the finding of the month.
06/07Hourly Trend works the same way, one row per trading hour. The read: the 11:00 hour has nearly doubled its share, and the lunch peak has spread across the early afternoon rather than disappeared.
07/07Specials: each promotion is judged only against its own history, per channel. Blanks mark periods when a special did not exist yet; last year's retired lunch combo still appears so the year-on-year total is honest. The day and hour split shows the specials trade almost entirely Tuesday to Thursday around midday.
The code that matters
def resolve_periods(df):
    if REVIEW_MONTH:                       # optional override, e.g. "2026-08"
        cm = pd.Period(REVIEW_MONTH, "M")
    else:
        # date columns in the export are the true coverage
        max_date = df.attrs.get("last_date", df["Date"].max())
        cm = max_date.to_period("M")
        if max_date.normalize() < cm.end_time.normalize():
            cm -= 1                        # latest month isn't complete yet
    ly = cm - 12
    prior = [cm - i for i in range(PRIOR_MONTHS, 0, -1)]
    return cm, ly, prior
Outcome

Why it matters

  • Two baselines on every line. The three-month average shows whether something is moving now; last year shows whether it is just the season.
  • Blanks mean something. ‘No history’ is kept apart from ‘sold nothing’, which stops new lines and specials distorting the growth figures.
  • Nothing to edit between runs. The script reads the dates from the export itself and works out which month it is reviewing, including when the latest month is still partial.

Result

  • An eight-sheet client review produced by one script run each month, finished with pickers, a slicer and written analysis.
  • Every figure read against both the recent run-rate and the same month last year.
  • Specials and new lines judged on their own history, with blanks instead of misleading percentages.
↑ All case studies
Case study 06 of 09

Service-Level Report & Escalation Email

  • Python
  • Python
  • pandas
  • openpyxl
  • HTML email

Splits every lost case by where it was lost, checks it against real stock, and drafts the escalation email by owner.

The problem

Every week some ordered cases never reach the shelf. They are lost at different points: rejected by the retailer’s ordering system (EDI), dropped at order confirmation, short-picked at the warehouse, or lost in transit. Each cause has a different owner, and the raw weekly extract mixes them all together.

The hardest question was whether a confirmation drop happened because there was no stock, which is a planning problem, or despite stock being available, which is a system or logistics failure. Answering it meant cross-checking fourteen daily stock files by hand.

What I built

A weekly script that splits every lost case by where in the order chain it was lost, checks each confirmation drop against the stock that was actually available that day, writes a three-tab report, and drafts one consolidated escalation email grouped by owner, in plain text and Outlook-ready HTML, plus a raw breakdown file.

How it works
  1. Load the extract

    The weekly order extract is cleaned and every quantity column coerced to numbers.

  2. Split the losses

    Three loss stages come from the order waterfall (final order vs confirmed, confirmed vs dispatched, dispatched vs delivered) alongside EDI rejections. Total loss is measured from the original order.

  3. Read the stock files

    Fourteen daily stock files (two systems, seven days) are read, or found automatically by their contents. The date is taken from inside each file, and duplicates keep the larger Available Stock figure.

  4. Judge each drop

    Stock is a shared pool, so each confirmation drop is judged per warehouse, product and delivery date against stock on that day or the day before.

  5. Write the report

    An executive summary with contribution data bars, a store loss breakdown per warehouse, and a warehouse × product × store × PO matrix with the stock verdict on every drop.

  6. Route the escalations

    EDI rejections go to the right team per retailer, with unrecognised chains listed for manual routing. Drops with stock go to logistics with a 48-hour feedback window, and drops without stock go to supply planning.

Inside the build · 6 views
01/06The Executive Summary tab: headline metrics, the loss split by type and the loss by warehouse, each share drawn as a data bar. The four loss types add to 118 against a total loss of 123. The 5-case gap is order quantity cut between the original and final order, which sits in no bucket, so the report shows it instead of hiding it.
02/06The same tab, further down: every product in the extract ranked by total loss, with a data bar on its share. Two products account for about 40% of the week’s loss, and for different reasons: Product 4 is all confirmation drops, Product 11 is mostly transit loss.
03/06Store Loss Breakdown: one block per warehouse, stores ranked by loss, each block with its own grand total that ties back to the summary. Problems cluster: one Retailer 1 store at DC West accounts for 15 rejected cases, and DC Coastal’s loss is almost entirely confirmation drops across Retailer 1 stores.
04/06DC Prod Store Matrix, part 1: every lost line by product, store and PO, with the stock verdict on each confirmation drop. At DC Coastal, every Product 4 drop is ‘No SOH’, so the issue goes to supply planning, not logistics. The Rosedale lines carry loss in no column: that is the order-amendment gap made visible.
05/06Part 2, the remaining warehouses. Product 12 was dropped at three DCs while stock was ‘In Stock’ each time, which points to a system or logistics failure rather than supply, and those lines go to the 48-hour logistics list.
06/06The output people act on: one consolidated email, grouped by owner. EDI rejections are routed by retailer, with anything unrecognised listed for manual routing. Drops with stock go to logistics with a 48-hour deadline, and drops without stock go to supply planning. Every line matches the matrix.
The code that matters
df["DSL Qty Loss"]   = df["Final Order Qty"]    - df["Confirmed Qty"]
df["BSL Qty Loss"]   = df["Confirmed Qty"]      - df["Dispatched Qty"]
df["TSL Qty Loss"]   = df["Dispatched Qty"]     - df["Delivered Qty"]
df["Total Qty Loss"] = df["Original Order Qty"] - df["Delivered Qty"]
Outcome

Why it matters

  • The stock check is the judgement call. A confirmation drop with stock available is a system or logistics failure; the same drop with no stock is a planning problem. Getting that wrong sends the escalation to the wrong team.
  • Judging per warehouse, product and day, rather than per order line, matters because three stores dropped against the same empty shelf are one supply problem, not three logistics ones.
  • Files are found by what they contain, so a renamed or re-dated export does not silently drop out of the check.

Result

  • One weekly run replaces a manual reconciliation of fourteen stock files against the order extract.
  • Every lost case has an owner, and every escalation goes to the team that can fix it.
  • The email is generated, not typed: grouped by owner, with deadlines, ready to send.
↑ All case studies
Case study 07 of 09

Production Planning Engine

  • Python
  • Python
  • openpyxl
  • pandas
  • Excel formula generation

Builds the monthly production plan and the customer pallet orders from four channels’ stock and sales reports, and documents every formula fault it fixed.

The problem

Monthly production was planned in a large, hand-maintained workbook fed by stock reports from four channels. Each report arrived in a different layout, often with an unpredictable filename, and one channel sent only raw invoice lines with no demand figure.

Over time the formulas had drifted. Some rows sat outside their totals, one stock figure was reported in kilograms as if it were cases, inbound stock was inflated by the cover multiplier, one channel would have been counted five times once it went live, and a single missing product could blank a whole customer sheet.

What I built

A script that reads every report dropped into one folder, identifies each one by its contents, and rebuilds the planning workbook from scratch. The workbook has a run summary, a sheet and a Final Production roll-up for each channel, four customer order sheets in full pallets and kilograms, and a Notes tab. Manual figures live in a single Inputs workbook that the script generates and keeps up to date. Every correction to the inherited formulas is listed on the Notes tab, so planners can see exactly what changed and why.

How it works
  1. Drop and run

    Planners drop the month’s reports into one folder, fill in Inputs.xlsx (opening stock, inbound and distributor volumes), and run one command. A refresh option rebuilds the inputs grid for new products and keeps everything already typed.

  2. Identify by content

    Each report is recognised from its sheet names and header cells, and two exports in the same ERP format are told apart by a principal field. If there are duplicates, the newest file is used and the rest are listed. Earlier outputs in the folder are skipped.

  3. Build the rate of sale

    For the channel that only sends invoices, sales are summed over the trailing 21 days and divided by the weekdays in that window.

  4. Match names safely

    Product names are normalised for case, spacing and punctuation only, then mapped through a small alias list. Fuzzy matching is deliberately avoided, because it could pair two genuinely different products.

  5. Write live formulas

    Each channel sheet calculates available stock, days of cover and required production, with working days and target cover as editable cells. SUMIFS rolls each one up into a Final Production tab.

  6. Order in pallets

    Customer sheets pull from the Final Production tabs, add distributor volumes and stock cover, deduct opening stock and inbound case for case, and round to full pallets and kilograms.

  7. Explain

    A Summary sheet gives headline figures and status counts. The Notes tab lists every exception from the run and every inherited formula fault, with an action for each.

Inside the build · 7 views
01/07The run sheet and the one input file. Summary lists which report was found for each source, the headline cases to produce and four status counts that point into the Notes tab, with a sign-off block for the planner. On the right is Inputs.xlsx: one tab per customer sheet that has only the columns that customer uses, and a per-DC inbound grid (filter open).
02/07A channel sheet and its Final Production tab. Report figures are in blue, and Required Production is a live formula with a data bar, driven by the amber Working Days and Target Days Cover cells. SUMIFS rolls each product up across plants under the report's own product name, which is the name the customer sheets match on.
03/07A distributor that reports by DC, with a 30-day target cover instead of 10. The inbound column is now empty on every channel sheet: inbound moved to the customer sheets, where it is no longer inflated by the stock-cover multiplier.
04/07Top: the one channel whose rate of sale the script builds itself, from raw invoice lines, as cases per weekday over the trailing 21 days. Its rows are a fixed list, because customer formulas match on those exact labels, and a name map translates the long names in the files. Two products with no recent invoices show a red zero rate, and the Notes tab flags them. Bottom: the partner-brand channel, which comes from the same ERP report format and is told apart by a principal field inside the file.
05/07A customer order sheet. Teal figures are pulled live from three Final Production tabs and amber figures are typed for distributors that send no report. Two weeks' cover is added, and opening stock and inbound are deducted case for case. The order rounds to full pallets (0.3 of a pallet or more rounds up) and converts to kilograms.
06/07The other three customer sheets, each with its own cover rule (1.5 weeks, 1 week, 1 week) and its own set of distributor columns. The partner-brand sheet pulls only from the partner channel. Pallet sizes vary by pack (90 or 120 cases), and two lines round up from 0.1 of a pallet.
07/07Notes & Exceptions, sorted by severity. The run's own findings come first: missing rates of sale, inbound that no customer row could use, and dates that would not parse. After them come the ten faults in the inherited workbook, each with what was done about it, including the ones deliberately left as they were.
The code that matters
"formulas": {
    6: "=C{r}+D{r}",                                    # available + inbound
    7: "=IF(E{r}=0,0,F{r}/E{r})",                       # days of cover
    8: "=MAX(0, E{r} * J${p} + (K${p} - G{r}) * E{r})", # required production
},
"params": {"J": "WorkingDays", "K": "TargetDaysCover"},

# Final Production: one row per product name the report actually used
f"=SUMIFS('{ch}'!H:H, '{ch}'!B:B, A{rr})"
Outcome

Why it matters

  • It writes formulas, not values. The output is still a spreadsheet the planning team owns: change working days or target cover and the whole plan recalculates, down to the pallet order.
  • Colour encodes provenance. Blue figures come from a source report, amber are manual inputs, teal are pulled across from another tab, and black are calculated. Anyone can tell at a glance what to trust and what to check.
  • Rebuilding the workbook as code surfaced ten formula faults in the original, including inbound stock counted at up to 1.5 times its real value. Each one is fixed, or deliberately kept and flagged, rather than quietly changed.

Result

  • A month’s production plan and four customers’ pallet orders, built from four channels’ reports in one run.
  • Ten inherited formula faults found and documented, each one either fixed or deliberately kept and flagged.
  • The planning team keeps a live, editable workbook, with provenance colour-coded and a sign-off block on the run sheet.
↑ All case studies
Case study 08 of 09

Store Stock Count Report

  • Python
  • Python
  • pandas
  • openpyxl
  • Conditional formatting

Turns weekly in-store stock counts into one line of priorities: phantom stock, big variances, short-dated stock.

The problem

Merchandisers count stock in store every week and record it next to the retailer portal’s stock figure, along with expiry dates. The master file grew a tab per week, with free-text counts, several expiry dates typed into one cell, and no quick way to see which stores needed action.

The most important distinction was also the easiest to miss: a blank count means nobody looked, while a count of zero against positive system stock means the shelf is empty but the retailer thinks it is full, so it will never reorder.

What I built

A report generator that turns the master file into one clean, formatted tab per week, with stores grouped into region bands. Each tab shows only what matters and flags what needs action: phantom stock, large variances, short-dated or expired stock, and products that were not counted.

How it works
  1. Find the weeks

    Every tab in the master file with an expiry column is treated as a week and rebuilt.

  2. Parse the expiries

    Several dates typed into one cell are split out. The earliest is shown with a ‘+’, and the full list sits in a cell comment.

  3. Separate blanks from zeros

    A blank count is ‘Not counted’. A zero count against positive portal stock is ‘Phantom stock’.

  4. Flag variances

    A variance of 3 or more units, or 25% or more of portal stock, is flagged as high.

  5. Flag expiry

    Expired or within 30 days is red, within 60 days is amber.

  6. Group and summarise

    Stores sit under region bands. A one-line tally at the top of each tab counts every flag type, and the sheet prints landscape on one page width with the header row repeated.

Inside the build · 5 views
01/05Week 40 in full, part 1: the title, the portal snapshot window and the one-line tally of priorities sit above the stores, grouped into region bands. Variance shades by severity (dark red for phantom stock, light red for 3+ units or 25%+ of portal stock), and expiry and days left shade red within 30 days and amber within 60. Store and merchandiser names are placeholders.
02/05Part 2 of the same tab: the remaining regions, with the header row repeated as it is when printed. Dates marked '+' carry more than one batch, and the red corner marks a cell comment.
03/05How every line is judged: three count verdicts and three expiry verdicts, with the shading each one triggers and how often it fired in Week 40. A blank count is never treated as a zero, so ‘not counted’ and ‘phantom stock’ stay separate problems.
04/05Merchandisers often record several batches in one cell. The report keeps the earliest date for the days-left check, adds a ‘+’ to the date and lists every batch in a cell comment.
05/05One tab per counted week, each with its own snapshot window and tally line. There is no combined sheet: the tool rebuilds every week that has expiry data, so earlier weeks stay as they were reported.
The code that matters
phantom = f"AND(ISNUMBER(E{r}),E{r}=0,D{r}>0)"
high = (f"AND(ISNUMBER(F{r}),F{r}<>0,OR(ABS(F{r})>={VAR_UNITS},"
        f"AND(D{r}>0,ABS(F{r})/D{r}>={VAR_PCT})))")
v = f'IF(E{r}="","Not counted",IF({phantom},"Phantom stock",IF({high},"High variance","")))'
e = (f'IF(H{r}="","",IF(H{r}<=0,"Expired",IF(H{r}<={RED_DAYS},"Short-dated",'
     f'IF(H{r}<={AMBER_DAYS},"Watch expiry",""))))')
flag = f'=IF(AND({v}<>"",{e}<>""),{v}&" + "&{e},{v}&{e})'
Outcome

Why it matters

  • Flags are written as Excel formulas, not fixed text. Correct a count in the sheet and the variance, flag and tally all update.
  • Phantom stock is the flag that matters most commercially. The retailer’s system believes the stock is there, so it never triggers a reorder, and the product quietly disappears from the shelf.

Result

  • A week of store counts reduced to one line of priorities per tab.
  • Phantom stock, which blocks reordering, is surfaced every week instead of discovered late.
  • Short-dated stock is visible 60 days out, while there is still time to move it.
↑ All case studies
Case study 09 of 09

Range Health & Activation Uplift

  • Python
  • Python
  • pandas
  • openpyxl

Finds every store where a listed product is not selling, and measures whether in-store activations moved it.

The problem

A product can be listed in hundreds of stores and still not sell in many of them. Store-level sales and stock-on-hand come from separate systems, and neither shows the full picture alone: in a sales report, a store holding stock that never sells looks the same as a store that was never supplied.

The field team also runs in-store activations and needed a fair answer to a simple question: did the activation actually move product?

What I built

Two connected tools. A slow and no-sales workbook classifies every store and product over 6-week and 12-week windows. For each window it gives a full list and a working list of stores holding stock, with article status, replenishment type, stock on hand and last received, sold and ordered dates to act on. An activation report measures each activation day against that store’s own baseline.

How it works
  1. Build the universe

    Every store and product combination is taken from both the sales data and the stock data (an outer join), so ranged-but-not-selling stores appear even with zero sales.

  2. Sum the window

    Units sold per store and product over the last 6 and 12 weeks, counted back from the latest day in the sales data.

  3. Set a fair bar

    Each product’s national average is taken across the stores that sell it. Slow means below 50% of that average, with a floor of 3 units.

  4. Classify

    Zero units is ‘No Sales’ and below the bar is ‘Slow Sales’. Each row carries article status, replenishment type, stock on hand and last received, sold and ordered dates.

  5. Full list, then working list

    The script no longer filters on article status. It keeps every row and the status column, and the working tabs are filtered down to stores that hold stock on a live status.

  6. Measure activations

    For each of last week’s activations, the baseline is that store’s average daily units over the 12 weeks before. Pairs with no trade either side are excluded, and a zero baseline with sales on the day is reported as ‘New’.

Inside the build · 6 views
01/06The Summary tab: flagged store-product pairs for each window, the colour legend, and a key to the replenishment codes so the account team can read the detail tabs without a lookup. The tab strip shows all nine sheets: a full list and a working list for no-sales and slow-sales in each window.
02/06‘6W - No Sale’ is the full output. Every store and product from the sales and stock files is here, including stores that appear only in the sales history (blank status), zero or negative stock, and delisted statuses. The script no longer filters on article status. It keeps the column so the team can filter it themselves, as in the open dropdown.
03/06‘6W - No Sales’ is the working list: the same rows filtered to stores that hold stock on a live article status. These are the stores where a zero means stock is sitting on the shelf, not a supply gap. Sorted by product, then store, and filterable by region.
04/06‘6W - Slow Sales’: stores that sold below the bar. Each product sets its own bar at half its national average across selling stores, with a floor of 3 units, which is why Product 1 is flagged under 4.9 and Product 2 at under 3. Filtering RP type to Y1/Y3 isolates the auto-replenished and store-ordered lines that should be moving.
05/06‘12W - No Sales’ in full: 48 store-product pairs with stock in store and no sale in twelve weeks. The bar is higher over the longer window (Product 1 averages 18.4 units against 9.8 over six weeks). This is the short list of persistent problems to take to the retailer.
06/06Activation Insights as active.py writes it: one row per activation store and product, with units on the day against the store’s own 12-week daily average. Uplift is green or red, and ‘New’ marks a store that had no sales in the baseline, here one taken from the 12-week no-sales list.
The code that matters
sales_skus = (sales.groupby(["Store ID", "Short Name"], as_index=False)
                   .size().drop(columns="size"))
soh_skus = (soh[["Site Code", "Short Name", "Site Article Status", "RP (MRP) Type",
                 "SOH Qty", "Date Last Received", "Date Last Sold", "Last Ordered Date"]]
            .drop_duplicates(subset=["Site Code", "Short Name"])
            .rename(columns={"Site Code": "Store ID"}))

# outer join: a ranged store with no sales still gets a row
universe = pd.merge(sales_skus, soh_skus, on=["Store ID", "Short Name"], how="outer")

# stock-file store name preferred, sales name as fallback
universe["Store"] = universe["Store_soh"].where(
    universe["Store_soh"].notna() & (universe["Store_soh"].str.strip() != ""),
    universe["Store_sales"])
universe["SOH Qty"] = pd.to_numeric(universe["SOH Qty"], errors="coerce").fillna(0)
Outcome

Why it matters

  • The outer join is the point. A sales-only view cannot see a store that sells nothing, and those are exactly the stores the report exists to find.
  • The thresholds are relative. A slow seller is judged against how that product sells elsewhere, so a niche line and a best-seller are each held to their own standard.
  • Activations are compared with the same store’s own history, not with other stores, so the uplift figure means what it says.

Result

  • 6-week and 12-week views of every store and product that is not selling, with the stock context to act on it.
  • Every activation measured against the store’s own baseline, within a week of it happening.
  • Account teams get a ready list to take to the retailer, filterable by region and replenishment type.
↑ All case studies
Toolkit

What I work with, and where to see it.

Each tool links to the case studies that use it.

BI & Reporting: Qlik Sense, Power BI

Programming: Python, VBA, SQL

Statistical (academic): STATA, R, SAS, EViews

Commercial: Key account management, Margin & pricing, Vendor sheets

Contact

Let’s talk about what you need built.

Dual British/South African citizen with full UK right to work. No sponsorship required. Available for remote roles, and happy to engage as an independent contractor invoicing in GBP, or through an EOR.

Status
Open to roles
Working
Remote
Engagement
Contract, EOR or permanent
Sponsorship
Not required