You can use the FORMAT function in DAX to control how dates are displayed in Power BI measures. Here’s a simple example:

DAX:

FormattedDate = FORMAT([DateColumn], "MMMM DD, YYYY")

This will format your date as “October 23, 2024” (Month Day, Year). You can use different format strings depending on your needs:

  • “MM/DD/YYYY” for Month/Day/Year (e.g., 10/23/2024)
  • “DD-MM-YYYY” for Day-Month-Year (e.g., 23-10-2024)
  • “YYYY-MM-DD” for Year-Month-Day (e.g., 2024-10-23)

If you’re working with null or blank values, you can handle them like this:

DAX:

FormattedDateWithCheck = IF(ISBLANK([DateColumn]), "No Date", FORMAT([DateColumn], "MMMM DD, YYYY"))

This ensures that blank values are displayed as “No Date” instead of causing errors.

Support On Demand!

QA Automation