DAX function
FORMAT — DAX function reference
Format a value as text.
Syntax
dax
FORMAT(<value>, <format_string>, [<locale_name>])
Examples
dax
FORMAT([Sales], "#,##0.00")
→ "1,234.50"
dax
FORMAT([Total Sales], "$#,##0,,\"M\"")
→ "$1.2M" style abbreviated currency
dax
FORMAT('Date'[Date], "mmm yyyy")→ "Jul 2026"
Common mistakes & gotchas
- FORMAT returns text, which sorts alphabetically. Keep the numeric measure for sorting.
- FORMAT always returns text, so a visual sorts formatted values alphabetically ("$1.2M" would sort before "$10M") — keep an unformatted numeric measure for sorting/axis use and reserve FORMAT for display labels like titles or tooltips.
- FORMAT is comparatively slow because it evaluates per row/context rather than using the engine’s native formatting — prefer a display format string on the measure itself when you just want number formatting, not a specific text pattern.
Related DAX functions
From Text