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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Anonymous
Not applicable

Reorganizing x axis on a line graph

Hi everyone. I'm a bit new here, so if I can improve my forum etiquette please let me know.  I have a large data set that includes, among other things, location names, and many metrics. I have the location names on the x axis of a line graph and the metric on the y. There are several hundred locations, and I want to be able to filter down the locations on the page based on certain criteria, for example, maybe the county the location is in. But I want the x axis to be sorted based on when the location started producing (which would be basically the earliest date found for each location, sorted ascending). And right now it sorts descending from the metric on the y.

I hope this makes. Any help would be really appreciated. 

I've found many re-sort/reorganize x axis questions here but none seem to answer my specific question. 

thanks so much

 

jeff 

1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

@Anonymous Well, you can change the sorting by using the ellipses (...) for the visual and then Sort axis and switch this to your x-axis column and then make sure it is Sort ascending (earliest first). Then what you will need is to create a column in your table that is the date of when the location started producing. You would then set the Sort By for your column used in the x-axis to this new column. 

 

If that doesn't help. Sorry, having trouble following, can you post sample data as text and expected output?
Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882

Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

1 REPLY 1
Greg_Deckler
Community Champion
Community Champion

@Anonymous Well, you can change the sorting by using the ellipses (...) for the visual and then Sort axis and switch this to your x-axis column and then make sure it is Sort ascending (earliest first). Then what you will need is to create a column in your table that is the date of when the location started producing. You would then set the Sort By for your column used in the x-axis to this new column. 

 

If that doesn't help. Sorry, having trouble following, can you post sample data as text and expected output?
Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882

Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

Top Solution Authors
Top Kudoed Authors