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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
emma313823
Helper IV
Helper IV

Is there a way to have a visual show 24 months on the x axis

I have a line chart which show 3 lines...actual numbers, a fixed forecast number and an adjusted forecast number.  Currently it plots just the current year.  Is there a way to plot this visual with 24 months, so you would see jan - dec for 2016 and after december see jan-dec for 2017.  I've tried it but it buckets both years into the months so just 12 months show with a combined total of both years.

 

Emma

Emma
1 ACCEPTED SOLUTION

Hi @emma313823,

 

According to your description above, you should be able to follow steps below to show months with different years on the x axis.

 

1. Set X-Axis field with a Date Hierarchy of Year and Month.

 

xaxis1.PNG

 

2. Click "Expand all down one leve in the hierarchy" on the left top of the Chart.

 

expand1.PNG

expand2.PNG

 

3. You can turn Concatenation On/Off to get your most expected result.

 

expand3.PNG

 

In addition, if you have too many years' data shown on the Chart, you can use a Slicer of Year to choose the years you want to show on the Chart.

 

Here is the sample pbix file for your reference.Smiley Happy

 

Regards

View solution in original post

5 REPLIES 5
BetterCallFrank
Resolver IV
Resolver IV

Hi Emma,

 

add a calc. column to your date table "Year-Month" with something like "2017-Jan" - put this on the x-axis and it should work fine 🙂

 

HTH,

Frank

sorry had to rethink this...when i pulled my data into BI desktop - i created two columns - one to pull out the month in a number format and the other to pull out the year by itself.  based on what you are suggesting...would concatenation work.  I'm not sure how to do a calculated column and pull in what you are suggesting.  Can you advise further?

 

emma

Emma

Hi @emma313823,

 

According to your description above, you should be able to follow steps below to show months with different years on the x axis.

 

1. Set X-Axis field with a Date Hierarchy of Year and Month.

 

xaxis1.PNG

 

2. Click "Expand all down one leve in the hierarchy" on the left top of the Chart.

 

expand1.PNG

expand2.PNG

 

3. You can turn Concatenation On/Off to get your most expected result.

 

expand3.PNG

 

In addition, if you have too many years' data shown on the Chart, you can use a Slicer of Year to choose the years you want to show on the Chart.

 

Here is the sample pbix file for your reference.Smiley Happy

 

Regards

so are you saying add a column and perhaps concatenate the year and month and then use that to plot on the x axis?

 

Emma

Emma

so are you saying add a column and perhaps concatenate the year and month and then use that to plot on the x axis?

 

Emma

Emma

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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