Number.From
This function retrieves a numerical value from the provided input. An optional culture parameter can be specified (e.g., "en-US"). If the input is null, the function returns null. If the input is alre...
This function retrieves a numerical value from the provided input. An optional culture parameter can be specified (e.g., "en-US"). If the input is null, the function returns null. If the input is already a number, it is returned as is. Various types of inputs can be converted to a numerical value:
- Text: Converts a textual representation of a number, such as "15", "3,423.10", or "5.0E-10". See Number.FromText for more information.
- Logical: Converts "1" to true and "0" to false.
- Datetime: Converts a double-precision floating-point number representing an OLE Automation date.
- Datetimezone: Converts a double-precision floating-point number representing an OLE Automation date in the local time zone.
- Date: Converts a double-precision floating-point number representing an OLE Automation date.
- Time: Converts time into fractional days.
- Duration: Converts duration into whole and fractional days.
If the input is of any other type, an error will be returned.
Retrieve the numerical value of "4" using Power Query MNumber.From("4"), resulting in an output of 4.
Obtain the numerical value of #datetime(2020, 3, 20, 6, 0, 0) by utilizing Power Query MNumber.From(#datetime(2020, 3, 20, 6, 0, 0)), which yields an output of 43910.25.
Retrieve the numerical value of "12.3%" through Power Query MNumber.From("12.3%"), resulting in an output of 0.123.