Skip to content
This repository has been archived by the owner on Oct 7, 2024. It is now read-only.
Dan Gorman edited this page Nov 29, 2018 · 2 revisions

The DOLLAR Function

Function Group: Text

DOLLAR returns the value in dollars of a given number.

Syntax

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)

Uses

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.

Other examples

DOLLAR can also take a second, rounding argument - for example:

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

Clone this wiki locally