This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
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'll paste an example of how I use it regularly, and the function I wrote from it which is giving me an error.
This is a snippet that works just fine:
Below is a snippet of the function which is giving me errors:
The error message reads as: Expression.Error: The name '_' wasn't recognized. Make sure it's spelled correctly.
In addition, I would like to know what causes Expression.Error messages. In this case, I understand that the underscore isn't defined. However, why does it seem to work fine within the image above?
Solved! Go to Solution.
@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
@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
Lydia,
Thank you, this solved the problem. After looking closely, the List.Transform method requires an "each" statement (not sure if that's how you say it "each statement"?).
The AlphaNumeric variable can go in there without having any quotes or ampersands.
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.