Search code examples
powerquerym

Expression.Error for Text.InferNumberType wasn't recognized


I've got a function where I want to determine if all the digits after the first are numbers. To do so, I thought I could use Text.InferNumberType which, per the documentation, should raise an error if the text is not a number.

Here is my code snippet:

a= Text.Start(Argument,1),
b= Text.End(Argument, Text.Length(Argument) - 1),
c= try Text.InferNumberType(b) otherwise "FALSE" , 

Instead, I'm getting this Expression.Error which says:

Expression.Error: the name Text.InferNumberType wasn't recognized. Make sure it's spelled correctly.

I literally copied and pasted the function name from the reference document, so I'm sure it's spelled correctly.

I'm using PowerQuery in Excel 2013. PowerQuery was installed about a week ago using the latest download from Microsoft. I did search and found this question - I'm wondering if this is a similar issue? I don't see anything in the documentation though which says this function wouldn't be available in certain versions of power query.


Solution

  • This is likely an older function that isn't supported in Excel 2013. I'd recommend a different function like Number.From or Number.FromText, which have similar functionality.