The request

From Luis Ortega, Warehouse Supervisor
Your goal
The Source step is October 2025's shipping file for Lighting and Kitchen (sku, description, units_shipped). Keep sku as it is, and add category_code (the part before the first hyphen, e.g. LIG) and product_id (the last part as a whole number, e.g. 127). Drop the middle part.
- Show exactly
skudescriptionunits_shippedcategory_codeproduct_idnot done yet - 38 rowsnot done yet
Your query steps
| sku | description | units_shipped | |
|---|---|---|---|
| 1 | KIT-COO-0141 | Thatcher Acacia Dutch Oven | 15 |
| 2 | KIT-COO-0145 | Cove Cast Iron Dutch Oven | 45 |
| 3 | KIT-COO-0149 | Hazel Stainless Dutch Oven | 4 |
| 4 | KIT-COO-0153 | Alder Acacia Dutch Oven | 10 |
| 5 | KIT-COO-0157 | Oakley Enamel Dutch Oven | 25 |
| 6 | KIT-DIN-0142 | Upland Acacia Serving Platter | 13 |
| 7 | KIT-DIN-0146 | Thatcher Cast Iron Bowl Set | 24 |
| 8 | KIT-DIN-0154 | Vale Enamel Bowl Set | 39 |
| 9 | KIT-DIN-0158 | Hazel Porcelain Serving Platter | 9 |
| 10 | KIT-GLA-0143 | Pine Cast Iron Carafe | 4 |
| 11 | KIT-GLA-0147 | Cedar Cast Iron Tumbler Set | 11 |
| 12 | KIT-GLA-0151 | Glen Stoneware Carafe | 42 |
| 13 | KIT-GLA-0155 | Tidewater Stainless Wine Glasses | 14 |
| 14 | KIT-GLA-0159 | Driftwood Porcelain Carafe | 3 |
| 15 | KIT-UTE-0144 | Hazel Porcelain Cutting Board | 7 |
| 16 | KIT-UTE-0148 | Spruce Enamel Utensil Set | 9 |
| 17 | KIT-UTE-0152 | Monroe Stoneware Utensil Set | 24 |
| 18 | KIT-UTE-0156 | Willow Acacia Knife Block | 19 |
| 19 | KIT-UTE-0160 | Fairhaven Stoneware Cutting Board | 17 |
| 20 | LIG-FLO-0121 | Bramble Ceramic Floor Lamp | 21 |
| 21 | LIG-FLO-0125 | Pacifica Black Metal Arc Lamp | 2 |
| 22 | LIG-FLO-0129 | Dune Ceramic Arc Lamp | 10 |
| 23 | LIG-FLO-0133 | Dune Black Metal Floor Lamp | 6 |
| 24 | LIG-FLO-0137 | Marlow Linen Floor Lamp | 3 |
| 25 | LIG-PEN-0123 | Sutton Brass Chandelier | 21 |
| 26 | LIG-PEN-0127 | Dune Black Metal Pendant Light | 23 |
| 27 | LIG-PEN-0131 | Ashford Linen Pendant Light | 7 |
| 28 | LIG-PEN-0135 | Ridge Ceramic Chandelier | 22 |
| 29 | LIG-PEN-0139 | Rowan Ceramic Chandelier | 19 |
| 30 | LIG-SCO-0124 | Marlow Glass Wall Sconce | 17 |
| 31 | LIG-SCO-0128 | Delancey Black Metal Wall Sconce | 17 |
| 32 | LIG-SCO-0132 | Fairhaven Brass Wall Sconce | 16 |
| 33 | LIG-SCO-0136 | Quarry Rattan Picture Light | 1 |
| 34 | LIG-SCO-0140 | Quarry Ceramic Picture Light | 1 |
| 35 | LIG-TAB-0122 | Monroe Glass Desk Lamp | 45 |
| 36 | LIG-TAB-0130 | Pacifica Black Metal Table Lamp | 6 |
| 37 | LIG-TAB-0134 | Sable Linen Table Lamp | 21 |
| 38 | LIG-TAB-0138 | Oakley Brass Table Lamp | 23 |
Loading the editor…
Reference solution
Mote checks your result
Press Check. Mote fills in your answer and compares it with what the report needs.
What Luis gets, and why
The lesson
Codes from other systems pack several facts into one string. LIG-PEN-0127 is Lighting, the
Pendants subcategory, product 127. To line the file up with your products table you need the
pieces as their own columns, and Luis wants the original kept.
Keep the original: Duplicate column
Most splitting steps replace the column they work on. When the original has to stay, copy it first:
Duplicate column: sku
In Power BI: right-click the sku header → Duplicate Column (or Add Column → Duplicate
Column). The copy is called sku - Copy, and the M is
Table.DuplicateColumn(Source, "sku", "sku - Copy").
Split by a delimiter
Split column: sku - Copy by "-"
In Power BI: select the column, Home → Split Column → By Delimiter, choose Custom and type
-, and keep Each occurrence of the delimiter. The copy becomes three columns named after it
with .1, .2, .3:
| sku - Copy | → sku - Copy.1 | sku - Copy.2 | sku - Copy.3 |
|---|---|---|---|
LIG-PEN-0127 |
LIG |
PEN |
0127 |
The same menu splits By Number of Characters, By Positions, by Lowercase to Uppercase
and more, and under Advanced options it can split into Rows instead of columns, useful
when one cell holds a list such as red;blue;green.
Name the parts, drop the rest, fix the type
Rename column: sku - Copy.1 to category_code
Remove columns: sku - Copy.2
Rename column: sku - Copy.3 to product_id
Change type: product_id to whole number
In Power BI, Split Column usually adds a Changed Type step by itself and guesses the new
columns’ types. Check what it guessed: a code whose leading zeros matter, like a ZIP code,
must stay text. Here the zeros are padding, and the product IDs in the model are numbers, so
product_id must be a whole number or it will never match.
Extract: one piece without splitting
When you need a single piece, Extract is quicker. Transform → Extract replaces the
column with the piece; Add Column → Extract puts it in a new column and keeps the original.
The options are Length, First Characters, Last Characters, Range, Text Before
Delimiter, Text After Delimiter and Text Between Delimiters. The category code is
Text Before Delimiter -:
Add column: category_code = Text.BeforeDelimiter([sku], "-")
and the product number is the last four characters, converted to a number:
Add column: product_id = Number.From(Text.End([sku], 4))
These two lines give the same result as the six steps above, and the checker accepts either. Split is easier to read when you need several pieces; Extract is shorter for one. Both are recorded steps that replay on next month’s file.
Common mistakes
- Splitting the only copy. The SKU is gone and Luis’s support team can’t look anything up.
- Splitting a description by spaces.
Dune Black Metal Pendant Lightsplits into five columns that mean nothing; split codes, not prose. - Trusting positions forever.
Text.End([sku], 4)works while every number has four digits; splitting at the delimiter keeps working if the partner adds a fifth one next year.
Lantern lit!
Practised: power queryduplicate columnsplit columnextracttext before delimiterchange typerename column
- Solved
- No hints
- First run
