Country or region and language

    Choose your country or region and your language.

    Suggested for you

      All countries and regions

        Choose your character

        It shows in the top bar and on your profile. Change it any time.

        Projects/Hearthline

        Why is profit falling when sales are up?

        Your first week as Hearthline's data analyst. Turn a messy order export into gross profit in Excel, roll it up in SQL, measure what each discount code costs in pandas, chart the margin in Power BI and tell your manager what to change.

        ProjectHearthline · fictional company2 h 30 min5 stagesData and analytics

        One brief, 4 toolsEvery order line keeps its id from the export to your workbook, your query and your notebook, and the monthly table you build in SQL is the one the dashboard reads.

        Hearthline

        Online retail

        About the company

        A small online shop for bedding, candles, cookware, lighting and rugs in the US.

        Hearthline sells homewares from its own website and ships from one warehouse. It buys from a handful of suppliers, sets its own prices, and runs discount codes: WELCOME10 for first orders and seasonal codes such as SUMMER25. The shop platform exports every order line with its list price, the discount and the unit cost, and the team pulls that export into spreadsheets, a small database and a Power BI report. You have just joined as the first data analyst, reporting to the head of e-commerce.

        Founded
        2021
        Head office
        Asheville, North Carolina
        Categories
        5
        Employees
        About 8

        Who writes the briefs

        • Grace MorenoHead of E-commerce

        A fictional company, invented for practice. Meet the other companies

        The brief

        From
        Grace MorenoHead of E-commerce
        To
        Data analyst
        Subject
        Welcome, and a first question

        Welcome aboard. Here is the question I have been meaning to ask someone who can answer it properly: August was our best month for sales, but the money in the bank says we made less, and September looks worse. I want to know why before we plan the holiday season.

        Attached is the order export for July to September. Fair warning, it is messy: discounts are blank when no code was used, and the August sync went wrong for a few days, so some lines may be in there twice.

        Done looks like: gross profit on every line, the margin by month and category, what each discount code costs us, a chart I can show the team, and a short recommendation.

        • Data: 400 order lines from July to September 2026, as the shop exports them.
        • You deliver a profit workbook, a monthly query, a discount code table, a margin chart and a recommendation.
        • Checks cover blank discounts, lines written twice, missing group keys and averaging percentages.

        The project path

        1. 1
          Excel30 min

          Work out the gross profit of every line

          One formula for the profit of each order line, after its discount and its cost.

          Reads
          order_lines
          Produces
          order_lines_profit

          SQL and pandas read your profit column.

          Open stageFree with an account
        2. 2
          SQL35 min

          Roll the lines up by month

          Revenue, gross profit and margin by month and category, with each line counted once.

          Reads
          order_lines_profit
          Produces
          monthly_margin

          Power BI charts this table.

          Open stageFree with an account
        3. 3
          pandas35 min

          Measure what each discount code costs

          Revenue, profit and margin for each code, next to full-price lines.

          Reads
          order_lines_profit
          Produces
          code_impact

          Your recommendation quotes these margins.

          Open stageFree with an account
        4. 4
          Power BI30 min

          Chart the margin month by month

          A Margin % measure that weighs every category by its sales, by month.

          Reads
          monthly_margin
          Produces

          Your recommendation points at the chart.

          Open stageFree with an account
        5. 5
          Readout20 min

          Write the recommendation

          Tell Grace what happened to profit, why, and what to change before the holidays.

          Reads
          monthly_margin · code_impact
          Produces
          profit_recommendation.md

          Optional: present it in Interview Hub.

          Open stageFree with an account

        Each stage includes reference inputs. Starting in the middle or using them doesn't complete the earlier stages.

        A free project

        Every stage of this project and the written readout are free with an account. All Access unlocks all 12 projects, 4 case studies and 2 journeys and allows you to practice interviews on a live call.

        Your Work Gym account

        Save your progress and pick up on another device. Your browser's progress comes with you.

        or

        You can keep practicing without an account.

        Help and feedback

        Ask a question, tell us what is not working, or share an idea. We reply by email.

        What is it about?

        We use it only to reply to you.