CURRENCY DAX Function (Math and Trig)

Returns the value as a currency data type.

Syntax

CURRENCY ( <Value> )
Parameter Attributes Description
Value

A scalar expression to be converted to currency data type.

Return values

Scalar A single currency value.

The value of the expression evaluated and returned as a currency type value.

Remarks

The CURRENCY function rounds up the 5th significant decimal, in value, to return the 4th decimal digit; rounding up occurs if the 5th significant decimal is equal to or larger than 5. For example, if the value is 3.6666666666666 then converting to currency returns $3.6667; however, if the value is 3.0123456789 then converting to currency returns $3.0123.

If the data type of the expression is Boolean then CURRENCY() will return $1.0000 for True values and $0.0000 for False values.

If the data type of the expression is String then CURRENCY() will try to convert string to a number; if the conversion succeeds the number will be converted to currency, otherwise, an error is returned.

If the data type of the expression is DateTime then CURRENCY() will convert the DateTime value to a number and that number to currency. DateTime values have an integer part that represents the number of days between the given date and 1900-03-01 and a fraction that represents the fraction of a day (where 12 hours or noon is 0.5 day). If the value of the expression is not a proper DateTime value, an error is returned.

The CURRENCY() function has the same behavior as calling CONVERT with a CURRENCY argument. The two following statements are equivalent:

CURRENCY ( <expression> )
CONVERT ( <expression>, CURRENCY )
» 1 related article
» 1 related function

Examples

--  CURRENCY converts any expression in a CURRENCY datatype
--  The Currency data type is called Fixed Decimal Number in Power BI
--  This data type stores 4 digits after the decimal point
EVALUATE 
    {
        ( "Currency 1", FORMAT ( CURRENCY ( 10 ), "#.00000" ) ),
        ( "Currency 2", FORMAT ( CURRENCY ( TRUE ), "#.00000" ) ),
        ( "Currency 3", FORMAT ( CURRENCY ( "1950.00" ), "#.00000" ) ),
        ( "Currency 4", FORMAT ( CURRENCY ( 190.29876 ), "#.00000" ) )
    }
Value1 Value2
2001-01-01 10.00000
2001-02-01 1.00000
2001-03-01 1950.00000
2001-04-01 190.29880

Related articles

Learn more about CURRENCY in the following articles:

Related functions

Other related functions are:

Last update: Sep 12, 2021   » Contribute   » Show contributors

Contributors: Alberto Ferrari, Marco Russo, Kenneth Barber,

Microsoft documentation: https://docs.microsoft.com/en-us/dax/currency-function-dax

2018-2021 © SQLBI. All rights are reserved. Information coming from Microsoft documentation is property of Microsoft Corp. » Contact us   » Privacy Policy & Cookies

Context Transition

This function performs a Context Transition if called in a Row Context. Click to read more.

Row Context

This expression is executed in a Row Context. Click to read more.

Iterator

Not recommended

The use of this function is not recommended. See Remarks and Related functions for alternatives.

Not recommended

The use of this parameter is not recommended.

Deprecated

This function is deprecated. Jump to the Alternatives section to see the function to use.

Deprecated

This parameter is deprecated and its use is not recommended.

DirectQuery compatibility

Limitations are placed on DAX expressions allowed in measures and calculated columns.
The state below shows the DirectQuery compatibility of the DAX function.

Contribute

Want to improve the content of CURRENCY? Did you find any issue?
Please, report it us! All submissions will be evaluated for possible updates of the content.


This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.