FORMAT
A value as text in a format string, in the model's culture or one named.
Group: Text. Compatible with DAX.
Syntax
FORMAT ( <value>, <format_string> [, <locale_name>] )
| Parameter | Type | Description |
|---|---|---|
value | Value | The number or date to write; a text is returned as it is. |
format_string | Text | How to write it: a pattern such as "#,0.00" or "yyyy-mm-dd", or the name of a format such as "Percent". |
locale_name | Text optional | A culture to write it in, such as "nb-NO" or "de-DE"; the model's culture when left out. |
Returns
Text. The value written as the format string says.
Remarks
- Numbers:
0is a digit that is always shown,#one shown only when needed,.the decimal point,,between digits the thousands separator, and%multiplies by 100 and shows the sign. Up to three sections split by;are for positive numbers, negative ones and zero: "0;(0);zero". - Dates:
d,dd,ddd,ddddfor the day as 2, 02, Mon, Monday;mtommmmfor the month in the same way;yyandyyyyfor the year;qfor the quarter;h,hh,nnandssfor the time, withAM/PMfor a 12-hour clock. Anmright after an hour or before seconds means minutes. - A backslash shows the next character as it is ("\Qq yyyy" gives Q4 2026); longer text goes in double quotes, doubled inside a formula.
- Names of formats are understood too, among them "Currency", "Percent", "Scientific", "General Number", "Short Date", "Long Date" and "Yes/No".
- Month and day names, separators and the currency sign come from the model's culture, unless locale_name names another. The Example Brewery's culture is English (United States); a model that names no culture is formatted that way too.
- A blank becomes empty text, not BLANK. A measure that returns
FORMAT ( ... )therefore shows a row for every item in a visual; keep the blank withIF ( ISBLANK ( x ), BLANK (), FORMAT ( x, ... ) ). - The result is text and sorts as text: Apr comes before Jan. Sort by a date or number column instead.
Examples
Patterns that read the same in every culture
EVALUATE
ROW (
"ISO date", FORMAT ( DATE ( 2026, 11, 2 ), "yyyy-mm-dd" ),
"Quarter", FORMAT ( DATE ( 2026, 11, 2 ), "\Qq yyyy" ),
"Two digits", FORMAT ( 7, "00" ),
"Negative", FORMAT ( -5, "0;(0)" ),
"Blank", FORMAT ( BLANK (), "0" )
)
| ISO date | Quarter | Two digits | Negative | Blank |
|---|---|---|---|---|
| 2026-11-02 | Q4 2026 | 07 | (5) | (empty text) |
Numbers and dates in the model's culture
The Example Brewery's culture is English (United States).
EVALUATE
ROW (
"Number", FORMAT ( 1234.5, "#,0.00" ),
"Percent", FORMAT ( 0.256, "0.0%" ),
"Month", FORMAT ( DATE ( 2026, 11, 2 ), "mmmm yyyy" ),
"Currency", FORMAT ( 1234.5, "Currency" )
)
| Number | Percent | Month | Currency |
|---|---|---|---|
| 1,234.50 | 25.6% | November 2026 | $1,234.50 |
In another culture
EVALUATE
ROW (
"Number", FORMAT ( 1234.5, "#,0.00", "nb-NO" ),
"Date", FORMAT ( DATE ( 2026, 11, 2 ), "dddd d. mmmm yyyy", "nb-NO" ),
"German", FORMAT ( 1234.5, "#,0.00", "de-DE" )
)
| Number | Date | German |
|---|---|---|
| 1 234,50 | mandag 2. november 2026 | 1.234,50 |
Related functions
FIXED, VALUE, CONCATENATE, DATE, USERCULTURE.