All work

Multi-currency sales and profit dashboard

For an online retailer with three stores, we built a sales and profit dashboard that works across currencies. The stores sell in US dollars, euros and Canadian dollars. The dashboard converts every order to US dollars, so the three stores can be added up and compared.

Client
Online retailer with three stores
Service
Dashboard
Data
2 years of orders in USD, EUR and CAD
Tools
Python, pandas, PostgreSQL, Django, Bash

The questions

  1. How do the three stores compare once every sale is in one currency?
  2. How much of each store's growth is demand, and how much is the exchange rate?
  3. Which store earns the best margin?

Example outputs

Client data stays confidential, so these charts use sample numbers in the same format as the delivered reports.

  • +1 ptof the year's reported growth comes from exchange rates
  • -4 ptsexchange-rate drag on the Canada store, which grew 6% at constant rates
  • 42%gross margin at the EU store, the highest of the three

How the data moves

Orders from three stores and a table of daily rates feed one dashboard.

  • US store orders in USD
  • EU store orders in EUR
  • Canada store orders in CAD
  • Daily exchange rates
Convert to USD and combine
One orders table in USD
Dashboard

Monthly sales by store

Index, January = 100. Sales are converted to US dollars at each order's date.

  • US store
  • EU store
  • Canada store
80100120140160JanMarMayJulSepNovUS store, Jan: 100US store, Feb: 96US store, Mar: 104US store, Apr: 108US store, May: 112US store, Jun: 109US store, Jul: 115US store, Aug: 118US store, Sep: 121US store, Oct: 126US store, Nov: 141US store, Dec: 152US storeEU store, Jan: 100EU store, Feb: 102EU store, Mar: 99EU store, Apr: 97EU store, May: 103EU store, Jun: 106EU store, Jul: 104EU store, Aug: 101EU store, Sep: 107EU store, Oct: 110EU store, Nov: 118EU store, Dec: 124EU storeCanada store, Jan: 100Canada store, Feb: 94Canada store, Mar: 92Canada store, Apr: 95Canada store, May: 93Canada store, Jun: 98Canada store, Jul: 101Canada store, Aug: 99Canada store, Sep: 96Canada store, Oct: 102Canada store, Nov: 109Canada store, Dec: 113Canada store80100120140160JanAprJulOctUS store, Jan: 100US store, Feb: 96US store, Mar: 104US store, Apr: 108US store, May: 112US store, Jun: 109US store, Jul: 115US store, Aug: 118US store, Sep: 121US store, Oct: 126US store, Nov: 141US store, Dec: 152EU store, Jan: 100EU store, Feb: 102EU store, Mar: 99EU store, Apr: 97EU store, May: 103EU store, Jun: 106EU store, Jul: 104EU store, Aug: 101EU store, Sep: 107EU store, Oct: 110EU store, Nov: 118EU store, Dec: 124Canada store, Jan: 100Canada store, Feb: 94Canada store, Mar: 92Canada store, Apr: 95Canada store, May: 93Canada store, Jun: 98Canada store, Jul: 101Canada store, Aug: 99Canada store, Sep: 96Canada store, Oct: 102Canada store, Nov: 109Canada store, Dec: 113

Growth with and without the exchange rate

Year on year. Constant rates means this year's sales converted at last year's rates. The US store sells in USD, so it has no exchange-rate effect.

StoreShare of salesGrowth as reportedGrowth at constant ratesExchange-rate effectGross margin
US store48%+14%+14%0 pts38%
EU store33%+9%+5%+4 pts42%
Canada store19%+2%+6%-4 pts31%
All stores100%+10%+9%+1 pt38%

Approach

  1. 1

    Collect orders from each store

    Load orders, refunds and product costs from the three stores every day, each in the currency it was sold in.

  2. 2

    Convert at the order-date rate

    Keep a table of daily exchange rates and convert each order at the rate on the day it was placed. A refund uses the rate of its original order, so it cancels the sale exactly.

  3. 3

    Keep both amounts

    Store the original amount, the converted amount and the rate used on every order line. Any total on the dashboard can be traced back to the store's own report.

  4. 4

    Separate currency from demand

    Convert this year's sales again at last year's rates. The gap between the two growth figures is the exchange-rate effect.

  5. 5

    Build the dashboard

    Sales, profit and margin by store, product and period, with the same definitions on every view.

Next projectCustomer churn prediction and retention analysisView project