Forum Discussion
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
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
- BhaveshPatel
Super User
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
- GilesWalker
Skilled Sharer
t-atgeor - This can be done easily using DAX. Create a new column with the following:
Month = FORMAT(YOUR_DATE_COLUMN,"MMM")
Giles
- BhaveshPatel
Super 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
Skilled 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]