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
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, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard

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.

@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, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard
MostafaGamal
Helper V
Helper V

Capture.PNG

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.

Top Solution Authors