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
Anonymous
Not applicable

Custom X Axis in Bar Graph

I'm trying to sort the look of this bar graph -- it is intended to be a 5 Month Rolling look at a pipeline. 4 months are obviously the remainder of 2019 (Sept-Dec), but when I include January 2020, it auto sorts chronologically with the months and puts January in front as the first month. I need January to show up as the last month on the view since it's in 2020 and the rest of the months are in 2019. Anyone know how to somehow include the year in the sorting of the x-axis items and put January (and when next month hits, February 2020, and so forth) in front?

 

5 Month Rolling Graph.PNG

1 ACCEPTED SOLUTION

I don't get it.

 

If you only need 5 months, then you can change the parameters of the Date table in my example and enter the necessary range.

2019-09-13 07_31_08-20190906_ExampleFile - Power BI Desktop.png

 

You should have a Date table and link it to your table. (Why? Here is an explanation)

 

If you don't want a DateTable for whatever reason you have to add another column to your existing table -> 

 

YearMonthNo = FORMAT ( [Close Date], "YYYYMM" )

You then classify this column as a number and you sort your monthnames by this column.

 

That should meet your communicated expectations....

 

If this post was helpful may I ask you to mark it as solution and give it some kudos?

Have a nice day!

BR,
Josef

 

View solution in original post

6 REPLIES 6
JosefPrakljacic
Solution Sage
Solution Sage

Your answer lies in the following youtube video.

 

If this post was helpful may I ask you to mark it as solution and give it some kudos?

Have a nice day!

BR,
Josef

 

Anonymous
Not applicable

Hello, thanks for linking that video, however, this still doesn't troubleshoot the issue since I have 4 of the months in 2019, and one month in 2020. So I would need it to be in order as: September, October, November, December, January

Hello @Anonymous,

 

Im sorry for my missunderstanding.

 

Here you can see that I could get the work done 

2019-09-06 20_23_30-20190906_ExampleFile - Power BI Desktop.png

 

What did I do? I ordered the MonthLong columny by a YearMonthNo Column (2019XX -> Datatype WholeNumber)

Here is my example file

 

If this post was helpful may I ask you to mark it as solution and give it some kudos?

BR,
Josef

Anonymous
Not applicable

Hi Josef, 

 

Thanks so much for your help, & and I apologize for still misunderstanding on my end, as I'm trying to sort the graph the way I would like without having to add more columns to the data. I've attached two screenshots of both the data it's pulling from, and the fields which the graph is applying to from the data. Any further help is much appreciated. Thanks!

 

https://ibb.co/ypyrNxM
https://ibb.co/0GpnFjS

Hi @Anonymous ,

Have you solved the problem with the suggestion of JosefPrakljacic ?

If you have solved the problem, please always always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.

If you still need help, please share the data sample and your desired output so that we could help further on it.

Best Regards,

Cherry

 

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

I don't get it.

 

If you only need 5 months, then you can change the parameters of the Date table in my example and enter the necessary range.

2019-09-13 07_31_08-20190906_ExampleFile - Power BI Desktop.png

 

You should have a Date table and link it to your table. (Why? Here is an explanation)

 

If you don't want a DateTable for whatever reason you have to add another column to your existing table -> 

 

YearMonthNo = FORMAT ( [Close Date], "YYYYMM" )

You then classify this column as a number and you sort your monthnames by this column.

 

That should meet your communicated expectations....

 

If this post was helpful may I ask you to mark it as solution and give it some kudos?

Have a nice day!

BR,
Josef

 

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.