cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dsmitha
Resolver I
Resolver I

Manual sort

Hi,

 

Request your guidance for solving my issue related to manual sort

 

I have a visual ( stacked column chart ) in which i want to sort the data manually, say for eg: i have a time bin and starting time bin is 00:00 to 03:00 am , then 03:00 am to 06:00 am etc.  In the visual I would like to have 06:00 am to 09:00 am as the starting one. how can i do the sort manually 

 

please help 

 

regards,

dsmitha

 

2 ACCEPTED SOLUTIONS
rohit_singh
Solution Sage
Solution Sage

Hello @dsmitha ,

Please try the following steps :

1) On your table, create a calculated column in which you will assign your intended sort order, for instance you want 6 am to 9 am as the 1st bin, so assign it a value of 1 and so on. I call this column "Sort Index"

Sort Index =

if (GroupSort[Group] = "06:00 am to 09:00 am", 1,
if (GroupSort[Group] = "00:00 to 03:00 am", 2,
if (GroupSort[Group] = "03:00 am to 06:00 am", 3,
0)))

rohit_singh_0-1652727915140.png


2) Next, click on the bin column, then click on option "Sort by column" under the "Column tools" ribbon. Select "Sort index" as the column to sort by.

rohit_singh_1-1652728128898.png

3) On your visual, click on the 3 dots on the top right, and select "Sort axis". Select axis as the bin column, and order as descending. You will notice that 06:00 am to 09:00 am is now the first bin as required.

rohit_singh_2-1652728244441.png

Kind regards,

Rohit


Please mark this answer as the solution if it resolves your issue.
Appreciate your kudos! 😊

View solution in original post

HotChilli
Super User
Super User

You create a new number column (either manually or use an index after sorting the data in power query)  and use the 'sort by column' feature.

View solution in original post

4 REPLIES 4
HotChilli
Super User
Super User

You create a new number column (either manually or use an index after sorting the data in power query)  and use the 'sort by column' feature.

hi hotchilli,

that was a quick one, thanks a lot

regards,

dsmitha

 

rohit_singh
Solution Sage
Solution Sage

Hello @dsmitha ,

Please try the following steps :

1) On your table, create a calculated column in which you will assign your intended sort order, for instance you want 6 am to 9 am as the 1st bin, so assign it a value of 1 and so on. I call this column "Sort Index"

Sort Index =

if (GroupSort[Group] = "06:00 am to 09:00 am", 1,
if (GroupSort[Group] = "00:00 to 03:00 am", 2,
if (GroupSort[Group] = "03:00 am to 06:00 am", 3,
0)))

rohit_singh_0-1652727915140.png


2) Next, click on the bin column, then click on option "Sort by column" under the "Column tools" ribbon. Select "Sort index" as the column to sort by.

rohit_singh_1-1652728128898.png

3) On your visual, click on the 3 dots on the top right, and select "Sort axis". Select axis as the bin column, and order as descending. You will notice that 06:00 am to 09:00 am is now the first bin as required.

rohit_singh_2-1652728244441.png

Kind regards,

Rohit


Please mark this answer as the solution if it resolves your issue.
Appreciate your kudos! 😊

hi rohit_singh,

 

thank you very much, it solved my issue

 

regards,

dsmitha

Helpful resources

Announcements
June 2022 update 768X460.jpg

Check it out!

Click here to read more about the June 2022 updates!

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power BI Dev Camp Session 23 768x460.jpg

Check it Out!

Mark your calendars and join us on Thursday, June 30 at 11a PDT for a great session with Ted Pattison!

June 20 episode 7 with aka link 768x460.jpg

The Power BI Community Show

Join us on June 20 at 11 am PDT when Kim Manis shares the latest on Azure Synapse analytics, the Microsoft Intelligent Data Platform, and notable Power BI Updates from Microsoft Build 2022.

Top Solution Authors
Top Kudoed Authors