Export (0) Print
Expand All

CURRENCY Function (DAX)

Topic Status: Some information in this topic is preview and subject to change in future releases. Preview information describes new features or changes to existing features in Microsoft SQL Server 2016 Community Technology Preview 2 (CTP2).

Evaluates the argument and returns the result as currency data type.

CURRENCY(<value>)

value

Any DAX expression that returns a single scalar value where the expression is to be evaluated exactly once before all other operations.

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

  • 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 or larger than 5. For example, if value is 3.6666666666666 then converting to currency returns $3.6667; however, if value is 3.0123456789 then converting to currency returns $3.0123.

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

  • If the data type of the expression is Text then CURRENCY(<Text>) will try to convert text to a number; if 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(<DateTime>) 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.

Convert number 1234.56 to currency data type.

=CURRENCY(1234.56)

Returns the value $1234.5600.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2015 Microsoft