FORMAT Function (DAX)
Converts a value to text according to the specified format.
FORMAT(<value>, <format_string>)
Parameters
| Term | Definition |
|---|---|
| value | A value or expression that evaluates to a single value. |
| format_string | A string with the formatting template. |
A string containing value formatted as defined by format_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 Format | Follow these instructions |
|---|---|
| Numbers | Use predefined numeric formats or create user-defined numeric formats. |
| Dates and times | Use predefined date/time formats or create user-defined date/time formats. |
All predefined formatting strings use the current user locale when formatting the result.
|
This DAX function is not supported for use in DirectQuery mode. For more information about limitations in DirectQuery models, see http://go.microsoft.com/fwlink/?LinkId=219172.
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)