Skip to main content

currency

Formats a number as a currency expression.

Important

FUNCTION DEPRECATED — superseded by currencyFormat.

Parameters

  • VALUE (number)

    The value to format.

  • UNIT (string)

    An optional parameter in which you can select the ISO code for the desired currency. You can choose from the following list: AUD, USD, GBP, EUR, JPY, CNY, CHF, CAD, NZD or ZAR.

    Default: USD

  • FORMAT (string)

    An optional parameter for defining the format of the currency unit. Choose either ISO CODE (the 3-letter code for the currency) or SYMBOL (the currency’s standard symbol, such as ‘$’, ‘£’ or ‘¥’).

    Default: ISO CODE

  • THOUSANDS (string)

    An optional parameter for applying formatting to values greater than or equal to 1000. Options are K, k, or thousand.

    Default: No formatting is applied when the parameter is left blank.

  • MILLIONS (string)

    An optional parameter for applying formatting to values greater than or equal to 1000000. Options are M, MM, or million.

    Default: No formatting is applied when the parameter is left blank.

  • BILLIONS (string)

    An optional parameter for applying formatting to values greater than or equal to 1000000000. Options are B, b, or billion.

    Default: No formatting is applied when the parameter is left blank.

  • NEGATIVE OPTIONS (string)

    An optional parameter for applying formatting to negative values. Options are minus, minusRed, brackets, or redBrackets.

    Default: minus

Examples

These examples show how to use the first two parameters:

ATL in Script

Result

[[currency(500,'USD')]]

USD500

[[currency(500,'USD','SYMBOL')]]

$500

[[currency(500,'EUR')]]

EUR500

[[currency(500,'EUR','SYMBOL')]]

€500

When you use the THOUSANDS, MILLIONS, and BILLIONS options, we recommend that you specify all three of them:

ATL in Script

Result

[[currency(5000,'USD','SYMBOL')]]

$5,000

[[currency(50000,'USD','SYMBOL')]]

$50,000

[[currency(500000,'USD','SYMBOL')]]

$500,000

[[currency(5000000,'USD','SYMBOL')]]

$5,000,000

[[currency(500000000,'USD','SYMBOL')]]

$500,000,000

[[currency(5000000000,'USD','SYMBOL')]]

$5,000,000,000

[[currency(5000,'USD','SYMBOL','K','M','B')]]

$5K

[[currency(50000,'USD','SYMBOL','K','M','B')]]

$50K

[[currency(500000,'USD','SYMBOL','K','M','B')]]

$500K

[[currency(5000000,'USD','SYMBOL','K','M','B')]]

$5M

[[currency(500000000,'USD','SYMBOL','K','M','B')]]

$500M

[[currency(5000000000,'USD','SYMBOL','K','M','B')]]

$5B

These examples show how to use the final parameter:

ATL in Script

Result

[[currency(-500,'USD','SYMBOL','','','','minus')]]

-$500

[[currency(-500,'USD','SYMBOL','','','','minusRed')]]

-$500

[[currency(-500,'USD','SYMBOL','','','','brackets')]]

($500)

[[currency(-500,'USD','SYMBOL','','','','redBrackets')]]

($500)