Power QueryExercises

Remove the two footer lines from a stock export (hardware)

The export tool appends two summary lines at the bottom of every file. Remove them, then type the counts.

Level
beginner
Time
~6 min
Task
Build the query
Access
Free — no account needed
Loading the practice workspace…

About this exercise

What you'll practise

Remove trailer rows that an export adds, before typing the data.

Tinker Depot (fictional) runs two warehouses for hardware supplies and exports stock levels nightly.

Steps

  1. StockFile is a comma-separated file with a header row. Its last two lines are always a footer (they start with --).
  2. Use the first row as headers, remove the two footer rows, then set OnHand to a whole number (en-US).
  3. Output SKU, Item, OnHand.

Your result must

  • No footer rows
  • Every stock row kept
  • OnHand is a whole number without errors

Input

  • StockFile (file)
    • Text file; first line: SKU,Item,OnHand
    • Every field is text until you set types

Expected output columns

SKU (text), Item (text), OnHand (number)

First 3 of 7 expected rows
SKUItemOnHand
SKU-001Sandpaper109
SKU-002Sandpaper138
SKU-003Hinge117