Forum Discussion
Anonymous
6 years agoNot applicable
Substring from an exited column
I hav a colum productName, how can I add new column Prodcutnew wich I do a substring from position4? For example PoductName: 01-Auto I need to dispaly Auto
ibarrau
6 years agoSuper User
Hi, there is an "Extract" option on the menu in query editor to extract with ranges. You can use that to get a formula like this:
= Table.AddColumn(#"Last Step", "Text Range Column", each Text.Middle([ColumnName], 3, 10), type text)
The 3 is the characters to avoid from the beginning and the 10 is the number of chars to consider on the rest of the string.
You can add that step in a blank one or search for "Extract" option under "Add Column" tab in query editor.
Regards,
- Anonymous6 years agoNot applicable
How can I put "10" total number of caracter? because I don't have the same total number of caracter for each product.
- ibarrau6 years agoSuper User
Consider adding the max number of chars that can be found on the column. If the column has less it won't matter because it will find the first, let's say 2, and extract the value. The 10 was an example.
Regards,