FIXED
Applies to: Calculated column Calculated table Measure Visual calculation
Rounds a number to the specified number of decimals and returns the result as text. You can specify that the result be returned with or without commas.
Syntax
FIXED(<number>, <decimals>, <no_commas>)
Parameters
Term | Definition |
---|---|
number | The number you want to round and convert to text, or a column containing a number. |
decimals | (optional) The number of digits to the right of the decimal point; if omitted, 2. |
no_commas | (optional) A logical value: if 1, do not display commas in the returned text; if 0 or omitted, display commas in the returned text. |
Return value
A number represented as text.
Remarks
If the value used for the decimals parameter is negative, number is rounded to the left of the decimal point.
If you omit decimals, it is assumed to be 2.
If no_commas is 0 or is omitted, then the returned text includes commas as usual.
The major difference between formatting a cell containing a number by using a command and formatting a number directly with the FIXED function is that FIXED converts its result to text. A number formatted with a command from the formatting menu is still a number.
This function is not supported for use in DirectQuery mode when used in calculated columns or row-level security (RLS) rules.
Example
The following formula used in a calculated column gets the numeric value for the current row in Product[List Price] and returns it as text with 2 decimal places and no commas.
Examples in this article can be used with the sample Adventure Works DW 2020 Power BI Desktop model. To get the model, see DAX sample model.
= FIXED([List Price],2,1)