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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors