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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
akhaliq7
Post Prodigy
Post Prodigy

Reduce Month-Year values in Line Graph (x-axis)

I have a line graph with the month-year on the x-axis. As the chart is relatively small, I need help reducing the number of month-years, showing a gap of two months instead of one. I want to show Jan-24, Mar-24, May-24, etc. How can I do this? I did have a look at bins but as it is a text column only allows me to use lists.

1 ACCEPTED SOLUTION
grazitti_sapna
Super User
Super User

Hi @akhaliq7 ,

Option 1: Create a Calculated Column for Alternating Months

Create a Calculated Column:

  • If your Month-Year field is a date column, you can use the following DAX formula to create a new calculated column that only includes every second month (e.g., odd months: Jan, Mar, May, etc.):
    AlternateMonths = IF( MOD(MONTH([YourDateField]), 2) = 1, FORMAT([YourDateField], "MMM-yy"), BLANK())

     

Option 2: Manually Adjust X-Axis Labels (Visual-Level Filter)

If you prefer to avoid creating a new column, you can apply a filter directly to the visual:

Visual-Level Filter:

  • In the visual’s Filters pane, add your Month-Year field.
  • Manually select only the months you want to display (e.g., Jan-24, Mar-24, May-24, etc.).
    This method works but requires manual maintenance if the data gets updated.

I hope this is helpful.
Thank You

View solution in original post

1 REPLY 1
grazitti_sapna
Super User
Super User

Hi @akhaliq7 ,

Option 1: Create a Calculated Column for Alternating Months

Create a Calculated Column:

  • If your Month-Year field is a date column, you can use the following DAX formula to create a new calculated column that only includes every second month (e.g., odd months: Jan, Mar, May, etc.):
    AlternateMonths = IF( MOD(MONTH([YourDateField]), 2) = 1, FORMAT([YourDateField], "MMM-yy"), BLANK())

     

Option 2: Manually Adjust X-Axis Labels (Visual-Level Filter)

If you prefer to avoid creating a new column, you can apply a filter directly to the visual:

Visual-Level Filter:

  • In the visual’s Filters pane, add your Month-Year field.
  • Manually select only the months you want to display (e.g., Jan-24, Mar-24, May-24, etc.).
    This method works but requires manual maintenance if the data gets updated.

I hope this is helpful.
Thank You

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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