Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

Integer Extraction function returning Expression.Error Message

Through some research, I found this formula to extract numbers only to use in my queries. Since it is used often, I want to write a function from it. However, I can't seem to make it work properly. I...
  • Anonymous's avatar
    Anonymous
    8 years ago

    Anonymous,

    Please check the following code.

    let intextaction=(AlphaNumeric as  text)=>
    
    let
        Source = Text.Combine(List.RemoveNulls(List.Transform(Text.ToList(""&AlphaNumeric&""),each if Value.Is(Value.FromText(_), type number) then _ else null)))
    in
        Source
    
    in
       intextaction



    Regards,
    Lydia