Forum Discussion

t-atgeor's avatar
t-atgeor
Icon for Microsoft Employee rankMicrosoft Employee
10 years ago
Solved

group dates into month

Hi, is there a way to aggregate dates into a single month? For example, I may have 9/1/2016, 9/3/2016, 9/5/2016 etc. and simply group them into September 2016 field, without having the dates behind.

 

Thanks.

 

Atanas

  • GilesWalker's avatar
    GilesWalker
    10 years ago

    Hi BhaveshPatel

     

    I did too. To make the dates into Sep 2016 then you can do the following:

     

    MonthY = FORMAT(DateKey[Date],"MMM")&" " &DateKey[Year]

8 Replies

  • Yes there are ways to do this using DAX but it would be better to post a snapshot of data to get the exact solution.

     

    Thanks & Regards,

    Bhavesh

  • t-atgeor - This can be done easily using DAX. Create a new column with the following:

     

    Month = FORMAT(YOUR_DATE_COLUMN,"MMM")

     

    Giles

    • BhaveshPatel's avatar
      BhaveshPatel
      Icon for Super User rankSuper User

      Hi Giles,

       

      It seems like you misunderstood the problem. He would like his all dates to be grouped in Sep 2016.

       

      Thanks & Regards,

      Bhavesh

      • GilesWalker's avatar
        GilesWalker
        Icon for Skilled Sharer rankSkilled Sharer

        Hi BhaveshPatel

         

        I did too. To make the dates into Sep 2016 then you can do the following:

         

        MonthY = FORMAT(DateKey[Date],"MMM")&" " &DateKey[Year]