DAX Text - FIXED function
Description
Rounds a number and returns the result as text. You can specify the number of digits to the right of the decimal points. You can also specify whether the result be returned with or without commas.
Syntax
FIXED (<number>, [<decimals>, [<no_commas>]])
Parameters
Sr.No. | Parameter & Description |
---|---|
1 |
number
|
2 |
decimals Optional. The number of digits to the right of the decimal point. If omitted, 2. |
3 | no_commas Optional. Can be specified only if decimals are specified. Otherwise, should be omitted.
|
Return Value
A number represented as text.
Remarks
If no_commas is FALSE or 0 or is omitted, then the returned text includes commas.
You have two options to format a column containing numbers −
- By using a formatting command from the Ribbon.
- Using the DAX FIXED function.
The difference between the two options is that the FIXED function converts its result to text, whereas with the formatting command the result is still a number.
Numbers can never have more than 15 significant digits, but decimals can be as large as 127.
Example
= FIXED ([Sales Amount],2)