Search code examples
powerbidaxpowerquerym

Powerquery extract text and numbers


I have 3 columns : Id,Name,Email

in the ID column i have values like :

123abcd,

_ETABCV,

34 dddd

I want, if possible, two new columns called "ID number" and "ID Text" where the first have only the numbers of the ID column, and the other only text of the ID column


Solution

  • In M, to grab numbers, add column ... custom column ... with formula

    = Text.Select([NameOfYourColumnHere],{"0".."9",".","-"})
    

    To grab letters, add column, custom column with

    = Text.Select([NameOfYourColumnHere],{"a".."z","A".."Z"})