Excels Get and Transform: Handling Leading Zeros and a Little M-Code @OzduSoleilDATA
Excels Get and Transform: Handling Leading Zeros and a Little M-Code  @OzduSoleilDATA
Uploaded December 2016 | Updated November 2026, 1 hour ago
(Download the workbook here:
datascopic.net/leading-zeros)

Here's another video with warning about some things that native Excel handles easier than Get & Transform (Power Query) does, but if we have to do this in Get & Transform, here's how.

Challenge: handling leading zeros.

Excel is known for clipping off leading zeroes. If you need a the month of March to be: 03
Excel will turn it into: 3

Or, account numbers that are always 6 digits,
Excel will turn 002251
into 2251

This video shows how to force native Excel to recognize leading zeros. Also, the M-Code use of

Text.PadStart

to force Get & Transform to honor leading zeros.

You also see the insertion of steps in a Get and Transform Query, problems with text versus number formatting. Oh! And a few pictures from a recent trip to New York City.

Please, enjoy. This is a 7.5-minute adventure.



My book: Guerrilla Data Analysis 2nd Edition
amazon.com/Guerrilla-Analysis-Using-Microsoft-Excel/dp/1615470336

My blog: datascopic.net/blog-2-2
Excels Get and Transform: Handling Leading Zeros and a Little M-CodeExcel Campus License Plate Challenge: The Down & Dirty EditionPower Query: Combine rows into a single cell with Text.CombineDynamic Array: Unstack Data with SEQUENCE ... just 2 stepsExcel Experts Live Challenge: Diarmuid Early vs. The Jumbled Course CompletionsExcel NETWORKDAYS part 3: calculating custom weekends with Power QueryMr. Excel (Bill Jelen) Challenge | Flattening Crazy Data | Podcast 2316Segmenting a List into 8 Pieces using Excels Power Query (Get and Transform)Cross Joins in Power Query: Measuring Student ProgressRedux: Students, Courses, Power Query, Group By & ListsExcel Power Query  Data Cleansing Part 2 Clean  Extract Data Using Formulas  Analytical ToolsExcel Dynamic Arrays: FILTER for Optional and Required Fields
Excel On Fire (Oz du Soleil) |

Excel's Get and Transform: Handling Leading Zeros and a Little M-Code

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER