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

Try your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now

Reply
Anonymous
Not applicable

Bar chart starts with wrong month

I have a simple bar chart displaying counts by month. It is filtered by relative dates "is in the next 1 year," but it starts with January instead of October (today). Any suggestions?

 

Screen Shot 2019-10-22 at 9.09.19 PM.png

1 ACCEPTED SOLUTION
Anonymous
Not applicable

The easiest way to solve is, in your Date table, create a column "Month Year" or something like that that has the Month and the Year.  Then use that field in your bar chart.  

You'll also need to create a MonthYearSort column that will get the Month Year column sorted properly (use the Sort By Column feature).

 

Here's the DAX:
MonthYear = FORMAT('Date'[Date], "MMM yyyy")

MonthYearSort = FORMAT('Date'[Date], "yyyyMM")

 

Eric

 

View solution in original post

4 REPLIES 4
amitchandak
Super User
Super User

First, use the month year and check. Is sorting working?

Also is this column created by you or generated by power bi hierarchy?

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

I made the date table. It consists of a column of unique dates representing the underlying data table and then columns for the corresponding day, month and year.

Screen Shot 2019-10-23 at 8.53.18 AM.png

 

 

I am using the Date column in the bar chart. I've tried using it as both the date hierarchy and just the date and various combinations of the month and month and year in the date hierarchy. If I set it as date instead of date hierarchy, I can get close. The bar chart now starts at the right time, but it splits the months into two bars. Maybe I can fix that with some formatting help.

 

Screen Shot 2019-10-23 at 8.56.04 AM.png

Anonymous
Not applicable

The easiest way to solve is, in your Date table, create a column "Month Year" or something like that that has the Month and the Year.  Then use that field in your bar chart.  

You'll also need to create a MonthYearSort column that will get the Month Year column sorted properly (use the Sort By Column feature).

 

Here's the DAX:
MonthYear = FORMAT('Date'[Date], "MMM yyyy")

MonthYearSort = FORMAT('Date'[Date], "yyyyMM")

 

Eric

 

venal
Memorable Member
Memorable Member

@Anonymous 

Can you please share us the PBIX file with the sample data with the current and expected results.

 

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.