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>] )
| Parameter | Type | Description |
|---|---|---|
number | Number | The number to round and write. |
decimals | Whole number optional | How many decimals to show; 2 when left out. Below zero, it rounds to tens, hundreds and so on. |
no_commas | Boolean 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 andFIXED ( -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 decimals | One | To hundreds |
|---|---|---|
| 1,234.57 | 1,234.6 | 1,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 )
)
| Whole | A half | Hundreds |
|---|---|---|
| 1235 | 3 | 1200 |