OpenBI Docs Buy

FIXED

A number rounded to a number of decimals (2 by default) as text, with or without thousands separators.

Group: Text. Compatible with DAX.

Syntax

FIXED ( <number> [, <decimals>] [, <no_commas>] )
ParameterTypeDescription
numberNumberThe number to round and write.
decimalsWhole number
optional
How many decimals to show; 2 when left out. Below zero, it rounds to tens, hundreds and so on.
no_commasBoolean
optional
TRUE to leave out the thousands separators; FALSE or left out to show them.

Returns

Text. The rounded number, written as text.

Remarks

  • The result is text: it sorts as text and cannot be added up. For a rounded number, use ROUND.
  • A half is rounded away from zero: FIXED ( 2.5, 0 ) is 3 and FIXED ( -0.005, 2 ) is -0.01.
  • The separators are the model's culture's. The Example Brewery's is English (United States), so 1,234.57; in a Norwegian model the same number is written with a space between the thousands and a decimal comma.
  • A blank counts as 0: FIXED ( BLANK () ) is 0.00.
  • For other forms, such as a percentage or a currency, use FORMAT.

Examples

Decimals and separators

EVALUATE
ROW (
    "Two decimals", FIXED ( 1234.567 ),
    "One", FIXED ( 1234.567, 1 ),
    "To hundreds", FIXED ( 1234.567, -2 )
)
Two decimalsOneTo hundreds
1,234.571,234.61,200

Without separators

With no thousands separator and no decimals, the text is the same in every culture.

EVALUATE
ROW (
    "Whole", FIXED ( 1234.567, 0, TRUE ),
    "A half", FIXED ( 2.5, 0, TRUE ),
    "Hundreds", FIXED ( 1234, -2, TRUE )
)
WholeA halfHundreds
123531200

FORMAT, ROUND, VALUE, CURRENCY.

Last updated · OpenBI Studio 0.3.74