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

  • The number you want to round and convert to text, or
  • A column containing a 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.

  • True () or 1: Does not display the commas in the returned text.
  • False () or 0 or omitted: Displays the commas in the returned text.

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) 
dax_functions_text.htm
Advertisements