Forum Discussion
Replace or remove values that are not in specified format. (Find and keep values)
- 4 years ago
Thanks to all who answered!
In fact, I took a part from everybody's answer to build my own solution.
I created a new column where...
1...all acharacters but digits and used delimeters are removed.
2...text is splitted by any defined delimeter.
3...text is combined back with delimeter "-", but only if format is correct (4 digits + 4 digits)
Hi,
Here is an example of existing data:
And here is how it should look like:
Those are shop floor quality notes from manufacturing operators. Unfortunately system hasn't forced operators to fill fields correctly.
I already have filled empty description fields by adding custom column:
= Table.AddColumn(#"Renamed Columns2", "NewDescription", each if [Description] = null then [Serial-Number] else [Description])
Next I want to remove extra strings from Serial-Number and keep actual serial number only.
- mahoneypat4 years ago
Microsoft Employee
If there are not numbers or hyphens in the other text, you can use this expression in your custom column.
= Text.Select([Description], {"-"} & {"0".."9"})
Pat