cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MostafaGamal
Helper V
Helper V

how to sort data in chart

Hi all, i have a table is use in a chart as the below

 

when i put this data in chart it starts with April ( sorting alphapticaly ) but i want the data to start with july - august as the table 

Capture.PNG

2 ACCEPTED SOLUTIONS
Tahreem24
Super User
Super User

Hi, 

Try to create a  column for Month like:

Month ID = Switch(Table[Month], "July", 1,"August", 2, "September ", 3,.....)

Likewise, complete all 12 month. Then go to Data Tab (just  above relationship tab at left most pane) then Select your Month Column then you will see "Sort by Column " option on the top menu where you need to select the Month ID (Above calculated column).

So automatically your chart will get sorted as per your Month ID.

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, and Sales Analysis Report

View solution in original post

v-stephen-msft
Community Support
Community Support

Hi @MostafaGamal ,

 

You try to add a Conditional Column in Power Query Editor as follows. Then select Month column to sort by this new column.

3.png4.png5.png

 

You can check more details from here.

 

Best Regards,
Stephen Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-stephen-msft
Community Support
Community Support

Hi @MostafaGamal ,

 

You try to add a Conditional Column in Power Query Editor as follows. Then select Month column to sort by this new column.

3.png4.png5.png

 

You can check more details from here.

 

Best Regards,
Stephen Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

@v-stephen-msft 

I have tried this but the same problem 

Tahreem24
Super User
Super User

Hi, 

Try to create a  column for Month like:

Month ID = Switch(Table[Month], "July", 1,"August", 2, "September ", 3,.....)

Likewise, complete all 12 month. Then go to Data Tab (just  above relationship tab at left most pane) then Select your Month Column then you will see "Sort by Column " option on the top menu where you need to select the Month ID (Above calculated column).

So automatically your chart will get sorted as per your Month ID.

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, and Sales Analysis Report

View solution in original post

MostafaGamal
Helper V
Helper V

Capture.PNG

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

November Power BI Update 768x460.png

Check it Out!

Click here to read more about the November 2021 Updates!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.