Formula to just take number from column

Options

I have a column with different assets

Tank 1

Engine 1

Engine 2

Tank 2

Tank 3

Engine 4

My question is I just want to take out the number from each and put in new column so can sort by just the number in each asset. Can someone help with this?

Tagged:

Best Answer

  • ColemenWilson
    Answer ✓
    Options

    In Magic ETL you can use REGEX_REPLACE(). Here is the formula:

    REGEXP_REPLACE(your_column, '[^0-9]', '')

    If I solved your problem, please select "yes" above

Answers

  • Sean_Tully
    Sean_Tully Contributor
    Options

    If the number is always the last character of the asset value, I would create a beast mode: right(asset, 1).

  • TMonty0319
    Options

    What if some assets have 2 words then the number?

  • ColemenWilson
    Answer ✓
    Options

    In Magic ETL you can use REGEX_REPLACE(). Here is the formula:

    REGEXP_REPLACE(your_column, '[^0-9]', '')

    If I solved your problem, please select "yes" above

  • TMonty0319
    Options

    Thanks that worked!