FORMAT DAX Function (Text)

Converts a value to text in the specified number format.

Syntax

FORMAT ( <Value>, <Format> )
Parameter Attributes Description
Value

A number, or a formula that evaluates to a numeric value.

Format

A number format that you specify.

Return values

Scalar A single string value.

A string containing Value formatted as defined by Format string.
The result is always a string, even when the value is blank.

Remarks

For information on how to use the Format string parameter:

The format strings supported as an argument to the DAX FORMAT function are based on the format strings used by Visual Basic (OLE Automation), not on the format strings used by the .NET Framework. Therefore, you might get unexpected results or an error if the argument does not match any defined format strings. For example, “p” as an abbreviation for “Percent” is not supported. Strings that you provide as an argument to the FORMAT function that are not included in the list of predefined format strings are handled as part of a custom format string, or as a string literal.

Last update: Dec 14, 2018   » Contribute   » Show contributors

Contributors: Alberto Ferrari, Marco Russo, Grantley Pyke

MSDN documentation: https://msdn.microsoft.com/en-us/query-bi/dax/format-function-dax

DAX Conventions
Context Transition

This function performs a Context Transition if called in a Row Context. Click to read more.

Row Context

This expression is executed in a Row Context. Click to read more.

Iterator

Not recommended

The use of this function is not recommended. See Remarks and Related functions for alternatives.

Not recommended

The use of this parameter is not recommended.

Deprecated

This function is deprecated. Jump to the Alternatives section to see the function to use.

Deprecated

This parameter is deprecated and its use is not recommended.

Contribute

Want to improve the content of FORMAT? Did you find any issue? Please, report it us!
All submissions will be evaluated for possible updates of the content.