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.

Need Help With QA Automation?

Work with our skilled full stack experts to improve your software quality, accelerate testing cycles, and enhance overall performance.

Hire Full Stack Developers

Support On Demand!

Related Q&A