FIXED

Updated on

FIXED is a DAX function that rounds a number to a specified number of decimal places and returns it as text with optional commas.

Syntax

FIXED(
   Number,
   Decimals,
   NoCommas
)
Argument Properties Description
Number The number you want to round and convert to text.
Decimals Optional The number of digits to the right of the decimal point; if omitted, 2.
NoCommas Optional A logical value: if TRUE, do not display commas in the returned text; if FALSE or omitted, display commas in the returned text.

Return Values

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)

Other functions related to FIXED are:

Contribute » | Contributors: Rick de Groot
Microsoft documentation: https://learn.microsoft.com/en-us/dax/fixed-function-dax

2023-2024 © BI Gorilla. All rights are reserved. Information from Microsoft docs is property of Microsoft Corp. | Privacy Policy