Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
kault
Helper II
Helper II

Grouping Dates By Month

I have a column in table "Accounts" called "Created Date". In a line chart, the data is showing by day. I want it to show by month.

 

I have spent two hours trying to figure this out myself. I created a "date table". I set a many:many relationship between Accounts(Created Date) and Date(Date). The line chart is still not grouping by month.

 

What am I missing?

 

 

1 ACCEPTED SOLUTION
V-pazhen-msft
Community Support
Community Support

@kault 

You can just use date hierarchy remove day, quarter and year, use month as the axis. See example:

V-pazhen-msft_1-1606272837059.png

V-pazhen-msft_2-1606272849676.png


Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
Syndicate_Admin
Administrator
Administrator

Click on the date field. The "Column Tool" option is enabled above in the horizontal bar.

In that tab click on "Data Group"

New data group

Discretization size you mark 1 and select month, or 2 and month and year, etc.

Ready.

V-pazhen-msft
Community Support
Community Support

@kault 

You can just use date hierarchy remove day, quarter and year, use month as the axis. See example:

V-pazhen-msft_1-1606272837059.png

V-pazhen-msft_2-1606272849676.png


Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

Why do you have a many to many relationship?  It should be one to many. Do you have a month column in your calendar table that you are using?  You should have. You also need a sort column for month to over ride the alpha sort order. 

I have a general article on calendar tables here https://exceleratorbi.com.au/power-pivot-calendar-tables/



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.

Thanks. I have changed it to many:one and still don't understand what to do.

 

Here is my date table dax:

date dax.jpg

 

Here is my date table:

date table.jpg

 

Here is how my visualization is set up:

date fields.jpg

 

Here is what I am seeing (this is what I want to group by month):

date graph.jpg

Remove CreatedDate from settings, leave only YearMonthShort

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

Check out the February 2024 Power BI update to learn about new features.

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.