This repository has been archived by the owner on Oct 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
DOLLAR
Dan Gorman edited this page Nov 29, 2018
·
2 revisions
DOLLAR
returns the value in dollars of a given number.
DOLLAR(arg1, [arg2])
-
arg1
is a number to be converted to dollar value -
arg2
is optional, and is a number representing the number of decimal places to round to (defaults to 2)
Let's say we receive some purchasing information like that shown below:
{
"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)
This would return $2019900.00
.
DOLLAR
can also take a second, rounding argument - for example:
DOLLAR(data.purchases.region.west, 1) => $1563005.0