Understand Number Functions in Power Query M Language, useful when performing operations on numerical data in data analytics tasks. This page provides a comprehensive list and descriptions of Number Functions available in the M Language.
Table of contents
Bitwise Operation Functions
| Function | Description |
|---|---|
| Number.BitwiseAnd | Returns the result of performing a bitwise “And” operation between the two inputs. |
| Number.BitwiseNot | Returns a byte where each bit is the opposite of the input. |
| Number.BitwiseOr | Returns the result of performing a bitwise “Or” between the two inputs. |
| Number.BitwiseShiftLeft | Shifts the bits set to the left. |
| Number.BitwiseShiftRight | Shifts the bits set to the right. |
| Number.BitwiseXor | Returns the result of performing a bitwise “XOR” (Exclusive-OR) between the two inputs. |
Creation and Conversion Functions
| Function | Description |
|---|---|
| Byte.From | Creates an 8-bit integer from the given value. |
| Currency.From | Returns a currency value from the given value. |
| Decimal.From | Creates a Decimal from the given value. |
| Double.From | Creates a Double from the given value. |
| Int16.From | Creates a 16-bit integer from the given value. |
| Int32.From | Creates a 32-bit integer from the given value. |
| Int64.From | Creates a 64-bit integer from the given value. |
| Int8.From | Creates a signed 8-bit integer from the given value. |
| Number.From | Creates a number from the given value. |
| Number.FromText | Creates numbers from common text formats (“15”, “3,423.10”, “5.0E-10”). |
| Number.ToText | Formats the given number as text. |
| Percentage.From | Returns a percentage value from the given value. |
| Single.From | Creates a Single from the given value. |
Information Functions
| Function | Description |
|---|---|
| Number.IsEven | Indicates if the value is even. |
| Number.IsNaN | Indicates if the value is NaN (Not a number). |
| Number.IsOdd | Indicates if the value is odd. |
Mathematical Operations
| Function | Description |
|---|---|
| Number.Abs | Returns the absolute value of the number. |
| Number.Combinations | Returns the number of unique combinations. |
| Number.Exp | Raises e to the given power. |
| Number.Factorial | Returns the factorial of the number. |
| Number.IntegerDivide | Divides two numbers and returns the integer portion of the result. |
| Number.Ln | Returns the natural logarithm of the number. |
| Number.Log | Returns the logarithm of the number to the specified base (default e). |
| Number.Log10 | Returns the base 10 logarithm of the number. |
| Number.Mod | Integer divides two numbers and returns the remainder. |
| Number.Permutations | Returns the number of permutations. |
| Number.Power | Raises a number to the given power. |
| Number.Sign | Returns 1 if the number is positive, -1 if it is negative, and 0 if it is zero. |
| Number.Sqrt | Returns the square root of the number. |
Random Number Generation Functions
| Function | Description |
|---|---|
| Number.Random | Returns a random number. |
| Number.RandomBetween | Returns a random number between two numbers. |
Rounding Functions
| Function | Description |
|---|---|
| Number.Round | Returns the rounded number |
| Number.RoundAwayFromZero | Returns the result of rounding positive numbers up and negative numbers down |
| Number.RoundDown | Returns the highest previous number |
| Number.RoundTowardZero | Returns the result of rounding positive numbers down and negative numbers up |
| Number.RoundUp | Returns the next highest number |
Trigonometric Functions
| Function | Description |
|---|---|
| Number.Acos | Returns the arccosine of the number. |
| Number.Asin | Returns the arcsine of the number. |
| Number.Atan | Returns the arctangent of the number. |
| Number.Atan2 | Returns the arctangent of the division of the two numbers. |
| Number.Cos | Returns the cosine of the number. |
| Number.Cosh | Returns the hyperbolic cosine of the number. |
| Number.Sin | Returns the sine of the number. |
| Number.Sinh | Returns the hyperbolic sine of the number. |
| Number.Tan | Returns the tangent of the number. |
| Number.Tanh | Returns the hyperbolic tangent of the number. |
2023-2026 © BI Gorilla. All rights are reserved. Information from Microsoft docs is property of Microsoft Corp. | Privacy Policy