Forum Discussion

tecumseh's avatar
tecumseh
Icon for Resolver III rankResolver III
10 months ago
Solved

DAX Query Format Date

Hi all, Using PBID Sept, 2025. Is it possible to return just a formatted date without first referencing the date column For example, I'm doing this EVALUATE SUMMARIZECOLUMNS( Bookings[Date]...
  • vaibhavmahajan's avatar
    9 months ago

    You can use the following DAX query to return only a formatted date, avoiding the ugly datetime string when copying to Excel:

     

    EVALUATE
    SELECTCOLUMNS(
        Bookings,
        "xDate", FORMAT(Bookings[Date], "MM/DD/YYYY")
    )

    • This will output only the xDate column with dates formatted as MM/DD/YYYY.
    • Excel will see the result as plain text, so the original datetime format like Wed, 01 Jan 2025 00:00:00 is avoided.
    • You don’t need to reference the original Bookings[Date] column separately, which keeps your solution clean and avoids violating DRY principles.


    If this answer helped, please click Kudos or Accept as Solution.

     

    Best regards,

    Vaibhav Mahajan

    LinkedIn: https://www.linkedin.com/in/vaibhavnmahajan