Forum Discussion
Alex03260
3 years agoRegular Visitor
Extract Text Based on Length of String
I have text in a column "Outline_Number" I want to extract some of the text based on the length of the string to a new column "Outline_Parent" i.e. I want the whole string minus the last 2 charac...
Vijay_A_Verma
3 years agoMost Valuable Professional
You may use this
Text.Start([Outline_Number],Text.Length([Outline_Number])-2)
If you have string less than 2 in length
then
try Text.Start([Outline_Number],Text.Length([Outline_Number])-2) otherwise null- Alex032603 years agoRegular Visitor
The first version worked but as expected gives an error on short string, the 2nd version gives a syntax error on the "otherwise null"