DOLLAR

DOLLAR returns the value of a given number in dollars.

Functional category: Text

Syntax

DOLLAR(arg1, [arg2])

Arguments

Description

arg1

Number to be converted to dollar value

arg2

Optional. Number representing the number of decimal places to round to (defaults to 2)

Examples

Example 1: Return a value in dollars

Let's say we receive the following purchasing information:

{
"data":{
"purchases":{
"region":{
"east": 2019900,
"west": 1563005,
"south": 200000
}
}
}
}

If we want to transform that into something more readable, we can use DOLLAR:

DOLLAR(data.purchases.region.east) = $2019900.00

Example 2: Rounding argument

DOLLAR can also take a second, rounding argument. For example:

DOLLAR(data.purchases.region.west, 1) = $1563005.00