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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
ironeagleuk
Frequent Visitor

Sorting Axis on Line Graph by Month Starting in August to July

I am having trerrible frustrations with a line graph trying to sort the Axis in Chronological order.

I'm currently using the January 2020 version of PowerBI RS version, and have looked at multiple posts in here on the subject from 2016 up to September 2020 , tried all the solutions and none have worked.  I have tried updating to May2020 version, and getting the same results.

 

The line graph has a current axis showing the month names, and I have tried the Sort by Column on the column of Month number, which is set to a numeric value.

 

I have also tried creating a seperate table with the month names and month numbers and linking in, but that doesn't work either.  It seems to insist on sorting by the value in the Line graph or the Month Name rather than the value of the month from the axis.

 

Below are some screenshots of what I have done so far

ironeagleuk_1-1602672941654.png

 

ironeagleuk_2-1602673034949.png

 

ironeagleuk_3-1602673184220.png

 

Is there anyway of stopping the sorting on the Visual from the Visual, as it seems to ignore the Sort by Column.

 

The line graph to the right of it was sorted by putting the MonthSort value in the ToolTips option, but that then looks cluttered when you view the tool tips.  I am trying to fix that one too.

 

I feel I am going round in circles....unless there's something really obvious I am missing in the previous reponses.

 

 

 

 

 

2 ACCEPTED SOLUTIONS
MFelix
Super User
Super User

Hi @ironeagleuk ,

 

You don't need to put the sort column in the visualization, what you need to do is to pick the column you want to have sorted by a different column in this case the ShortMonth and then on the sort by column select the MonthSort column.

 

This will automatically sort your short month by the number and not by text. Be aware that when you do this you probably will need to take the column ShortMonth from the axis and replace it because some times the sorting does not take immediate effect on the visualizations that are already created.

 

When I do this ussually I hide the Sort column so I don't get confused building my visualizations.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

amitchandak
Super User
Super User

@ironeagleuk , Setup seems correct. I noticted both times you click on the "month sort" column and showing sorting on month sort column.

You need to click on the smallmonth column and sort on the month sort column.

 

Please check again. This what I am seeing in screenshots.

View solution in original post

4 REPLIES 4
amitchandak
Super User
Super User

@ironeagleuk , Setup seems correct. I noticted both times you click on the "month sort" column and showing sorting on month sort column.

You need to click on the smallmonth column and sort on the month sort column.

 

Please check again. This what I am seeing in screenshots.

@amitchandak @MFelix  Thanks to both of you.

 

I thought I only had to click on the Column I wanted to sort by in the Fields list, and again click that same field in the Sort By Column dropdown.

 

But selecting SmallMonth in the fields list, then selecting MonthSort in the drop down Sort By Column indeed did work

 

Thanks again, I must have missed something in previous solutions.

 

ironeagleuk_0-1602681523029.png

 

 

 

The Sort Column by is regarding a single column not the all table on your model, so you can have several columns in the same table and the sorting be different for each other.

 

Glad you were abble to solve it.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



MFelix
Super User
Super User

Hi @ironeagleuk ,

 

You don't need to put the sort column in the visualization, what you need to do is to pick the column you want to have sorted by a different column in this case the ShortMonth and then on the sort by column select the MonthSort column.

 

This will automatically sort your short month by the number and not by text. Be aware that when you do this you probably will need to take the column ShortMonth from the axis and replace it because some times the sorting does not take immediate effect on the visualizations that are already created.

 

When I do this ussually I hide the Sort column so I don't get confused building my visualizations.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors