It is possible, using the Text.PositionOfAny, Text.Range and variables. You need to create a new calculated column, with the following code:
So len, position_special, position_n are variables
len - gets the length of the text for getting the later substring
position_special = Text.PositionOfAny([Column1], {"-", "_"}, Occurrence.Last)
Looks for the "-" or "_" in the column, if it isn't there, then it will return a -1. You can test this in its own custom column.
position_n = position_special + 1
Just adds 1 to the string for the start position
return_value = if position_special <> -1 then Text.Range([Column1], position_n , (len - position_n)) else Text.TrimStart([Column1], "0")
This section is the IF/THEN/ELSE section, so it checks if it has a special character, not equal to -1, then will get the text in the range, if not, it should find trim the leading "0". The full code for the calculated column is:
let
len = Text.Length([Column1]),
position_special = Text.PositionOfAny([Column1], {"-", "_"}, Occurrence.Last),
position_n = position_special + 1,
return_value = if position_special <> -1 then Text.Range([Column1], position_n , (len - position_n)) else Text.TrimStart([Column1], "0")
in
return_value
Hope that helps. It may need tiding up, but it should get you what you want