Logo - Keyrus
  • Playbook
  • Services
    Data advisory & consulting
    Data & analytics solutions
    Artificial Intelligence (AI)
    Enterprise Performance Management (EPM)
    Digital & multi-experience
  • Insights
  • Partners
  • Careers
  • About us
    What sets us apart
    Company purpose
    Innovation & Technologies
    Committed Keyrus
    Regulatory compliance
    Investors
    Management team
    Brands
    Locations
  • Contact UsJoin us

Automating Margin Analysis and Cutting Data Processing from Hours to Minutes

60%

Faster data extraction using multi-threading

90%

Fewer script failures due to better data type enforcement.

80%

Reduction in data processing time (from 5+ hours to under 1 hour).

Background

A major packaging and printing company with 8,000+ employees and 40+ facilities across North and Latin America aimed to transform its financial analytics. The focus was on Pocket Margin Analysis (PMA), a granular profitability analysis across plants, products, and customers. The company needed a scalable, automated solution to replace fragmented, manual reporting and support strategic decisions.

Challenge

The project tackled several complex issues: • Data fragmentation: Data came from multiple ERP systems, flat files, and manual inputs across 40+ plants. • Limited visibility: Existing tools couldn’t provide real-time, company-wide profitability insights, especially for inter-company sales. • Manual processes: Static Excel-based reporting was slow, error-prone, and lacked scalability. • User empowerment: Needed to enable self-service analytics for financial analysts and plant controllers. • Cross-platform deployment: Required compatibility across Windows, Linux, and Docker environments

Approach

A robust, end-to-end pipeline was built using Python and modern data engineering practices: • Data ingestion: Multi-threaded extraction from SQL Server and flat files, stored as CSVs. • Processing engine: Python-based computation of invoice-level profitability, including UOM conversions and leaker allocations. • Leaker Allocations: Leakers (costs) gathered through Gathering tools surveys across sites and allocated using custom built Python logic. • True-up logic: Adjustments applied using custom Gathering tools surveys to ensure accuracy. • Inter-company sales tracking: Mapped purchase and sales orders across ERPs to calculate company-level margins. • Web interface: Flask-based site with FastAPI backend for triggering builds, managing access, and promoting versions from UAT to Prod. • Visualization: Results consumed via QlikSense with row-level security for leadership insights

Key results

01
25% improvement in allocation speed
02
Unified data source: Replaced fragmented site-level reporting with a centralized, accurate system.
03
Real-time insights: Empowered users to trigger builds and analyze data within minutes.

Benefits

This digital transformation project successfully established a unified, centralized data source to replace fragmented site-level reporting, granting stakeholders real-time insights and the power to analyze data within minutes. This new system delivered strategic visibility by enabling inter-company sales tracking, allowing leadership to accurately view profitability and operational performance across the entire organization. Crucially, this robust foundation is now future-ready, paving the way for advanced initiatives like dynamic pricing, cost optimization, and sophisticated customer segmentation.

Technology partners

Python

Share this key play

whatsapptwitter
linkedinfacebookworkplace

More key plays

From Legacy Risk to Modern Compliance: Replatforming the Lobby Tracker for a Leading Non-Profit
Building a Reusable ML Framework for Private Equity Valuation
AI and ML-Powered Sales Quota Predictions for a Pharmaceutical Company
Generative AI Chatbot for Scalable Transcript Intelligence
SmartSearch Chatbot for Document Retrieval
Transforming Procurement: End-to-End Analytics for Internal and External Success
Building an Intelligent Chatbot Framework for Cloud Operations
Enhancing Operational Process Performance with a Modern Cloud Platform
Smarter, Faster, and Scalable: How Keyrus Leveraged GenAI and UNSPSC for Product Classification
Faster Power BI Reports and Better Use of Premium Capacity: How We Helped Pernod Ricard Do It
Logo - Keyrus
Montreal

1396 rue Sainte Catherine Ouest #205 Montréal QC H3G 1P9 Canada