Currency.From
NumberConverts a value to a currency number — a fixed-decimal type with exactly 4 decimal places.
Syntax
Currency.From(value as any, optional culture as nullable text) as nullable numberParameters
| Name | Type | Required | Description |
|---|---|---|---|
value | any | Yes | The value to convert. Accepts number, text, logical, or null. |
culture | text | No | An optional culture string for locale-aware parsing of text values. |
Return Value
number — A fixed-decimal number with 4 decimal places (currency type).
Remarks
Currency.From converts a value to the currency data type — a fixed-decimal number that always stores exactly 4 decimal places. Under the hood, the value is represented as a scaled 64-bit integer (the value multiplied by 10,000), which gives it exact decimal arithmetic for monetary amounts up to ±922,337,203,685,477.5807. This is the type labeled "Fixed Decimal Number" in the Power Query UI and "Currency" in Power BI Desktop's data type menu.
The primary reason to use currency type instead of the default double-precision number is to avoid IEEE 754 floating-point rounding errors. For example, 0.1 + 0.2 in double-precision does not equal exactly 0.3, but in fixed-decimal arithmetic it does. This matters when summing large numbers of monetary amounts where accumulated rounding errors could affect financial reports. However, note that currency type has a fixed precision of 4 decimal places — it cannot represent values like 0.123456. For higher-precision decimal work, use Decimal.From instead.
Text values are parsed using the specified culture — important when your source data uses locale-specific decimal separators (e.g., a comma in French or German). Logical true converts to 1.0000, false to 0.0000, and null returns null. To apply the currency type to a whole column in a table, use Table.TransformColumnTypes with Currency.Type.
Examples
Example 1: Convert a decimal number to currency type
Currency.From(19.99)Result | |
|---|---|
| 1 | 19.99 |
Example 2: Parse a currency value from text
Currency.From("1234.5678")Result | |
|---|---|
| 1 | 1,234.57 |
Example 3: Apply currency type to price columns in Sales
Table.TransformColumnTypes(
Table.SelectColumns(Table.FirstN(Sales, 4), {"OrderID", "CustomerName", "UnitPrice"}),
{{"UnitPrice", Currency.Type}}
)OrderID | CustomerName | UnitPrice | |
|---|---|---|---|
| 1 | 1 | Alice | 25 |
| 2 | 2 | Bob | 50 |
| 3 | 3 | Charlie | 15 |
| 4 | 4 | Alice | 75 |