Table of contents
Collapse the table of content
Expand the table of content

FORMAT Function (DAX)

Owen Duncan|Last Updated: 10/5/2018
1 Contributor

Converts a value to text according to the specified format.


FORMAT(<value>, <format_string>)  


valueA value or expression that evaluates to a single value.
format_stringA string with the formatting template.

Return Value

A string containing value formatted as defined by format_string.


If value is BLANK() the function returns an empty string.

If format_string is BLANK(), the value is formatted with a "General Number" or "General Date" format (according to value type).


For information on how to use the format_string parameter, see the appropriate topic listed below:

To FormatFollow these instructions
NumbersUse predefined numeric formats or create user-defined numeric formats.
Dates and timesUse predefined date/time formats or create user-defined date/time formats.

All predefined formatting strings use the current user locale when formatting the result.


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.

This DAX function is not supported for use in DirectQuery mode. For more information about limitations in DirectQuery models, see

See Also

Pre-Defined Numeric Formats for the FORMAT Function
Custom Numeric Formats for the FORMAT Function
Pre-defined Date and Time formats for the FORMAT Function
Custom Date and Time formats for the FORMAT Function
VALUE Function (DAX)

© 2018 Microsoft