top of page



Power Query: Cleaning data to keep only numbers
I had a requirement to clean out all data in a field except for the numbers. This was a plain text field where users would manually enter data and within the text was an order number. For example, from the below I just want 51638, the rest is discarded. The data I got was never entered consistently (humans, am I right?) so using any kind of pattern to obtain the order number was not possible. The below shows an example of the data, and the result I want. Power Query has a won
Ben Watt
Dec 16, 20203 min read
Â
Â
Â


Power Query: Sort + Distinct, a quick tip.
When you perform a Distinct operation in Power Query, the elimination policy is to keep the first instance it sees of the column(s) you have nominated, then discard any subsequent matching rows. There are occasions when you may want to be more selective in choosing which row you keep. For example, the below shows a list of Products with a Part Number, Description & Last Sold Date. As you can see, the description has changed over time, so I want my result set to reflect the cu
Ben Watt
Dec 13, 20202 min read
Â
Â
Â
bottom of page