FIXED function

This topic describes the formula syntax and usage of the FIXED function in the Data Quality Execute Formula transform.

Description

Formats a number as text with a fixed number of decimals.

Syntax

FIXED(number, [decimals], [no_commas])

The FIXED function syntax has the following arguments:

  • number Required. The number you want to round and convert to text.
  • decimals Optional. The number of digits to the right of the decimal point. If you omit this argument, the default is 2.
  • no_commas Optional. A logical value that, if TRUE, prevents FIXED from including commas in the returned text.

Notes

  • Numbers can never have more than 15 significant digits, but decimals can be as large as 127.
  • If decimals is negative, number is rounded to the left of the decimal point.
  • If no_commas is FALSE or omitted, then the returned text includes commas.

Example

Table 1. Data
Number1 Number2 Number3
1543.456 -1543.456 88.442
Table 2. Formulas
Formula Description Result
FIXED([Number1],1] Rounds the number in field Number1 to one digit to the right of the decimal point. 1,543.5
FIXED([Number1],-1] Rounds the number in field Number1 to one digit to the left of the decimal point. 1,540.
FIXED([Number2],-1,TRUE] Rounds the number in Number2 one digit to the left of the decimal point, without commas. -1540.
FIXED([Number3]] Rounds the number in field Number3 to two digits to the right of the decimal point. 88.44