Forum Discussion

cristianml's avatar
cristianml
Post Prodigy
4 years ago
Solved

Personalized column date

Hi, I want to create a personalized column with a formula in the query editor for dates from another column. In this case I want to have a format of the date MMM-YY  I have some error with the foll...
  • wdx223_Daniel's avatar
    4 years ago

    Date.ToText([#"[Month]"],"MMM-YY")

  • mahoneypat's avatar
    mahoneypat
    4 years ago

    Actually, there are at least two ways to do that.

     

    1. Add a Sort By column.  Make your date as an integer like yyyyMM so tht it sorts correctly and use that as a Sort By column for your formatted date column.

    2. (recommended) - Create you column by making the start or end of month instead and leave it as a Date.  Then use a Custom Format String to display it as you like.

    Creating a simple date table in DAX - SQLBI

     

    Pat