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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Eliminating summer months from x-axis of line graph

Hi!

 

I have school data that only has data values during the school year. I have a line graph set up to track several metrics continously over the course of several years. However, there is NO data during the summer months. How can I eliminate the summer months from the x-axis of a line graph visual? How can I get the x-axis to skip those summer months and jump right to September after May each year? 

 

As a sidenote, filtering the data for only school year data would not be helpful, since there isn't actually any data to start with for the summer. 

6 REPLIES 6
Greg_Deckler
Community Champion
Community Champion

Set your X-Axis to Categorical



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Ah, ok! 

 

When I switch to categorical, I get a better looking graph, but the category labels (dates) along the x-axis are listed for every single data point--how do I reduce it to one label per month along the x-axis? (When in continuous mode, this happened automatically.)

Hi @Anonymous,

 

Set X-axis type to Categorical.

Change date field to Hierarchy and remove day and quarter items.

Drill down to Year-Month level.

 

1.PNG

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

This almost works, except that it aggregates the data by month and displays it as a single data point per month. I still need all of the weekly data points to actually display on the graph, to be able to see the changes week to week, but the labels just don't all fit. 

Hi @Anonymous,

 

If you have a WeekNum field in data table, you could add it to "Legend" section of the chart, to show weekly data per month.

 

Regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Well, if you have something like a date that looks like 1/12/2018, then create a Month column with a formula like:

 

Month = MONTH([Date])

You can also do something like FORMAT([Month],"mmmm") and things like that to get the format that you want. Often, in these cases, you will have a Month column like "January", "February", etc. and a "MonthSort" column like 1, 2, 3, etc. and you will set your sort by column for your first column to be your second column so that everything is in the right order.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.