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
Anonymous
Not applicable

How To Sort Columns based on other columns with duplicate values

I have 3 columns:

  1. destination town
  2. destination branch
  3. destination town index

The index columns are whole numbers that represent the actual geographical location of each town. I have pivot table matrix with origin town and destination town, and by default, the pivot sorts the towns by alphabetical order.

I would like to sort the towns by index but can't figure out how to as there are duplicates in town & index columns as per screenshot below. 

How do I overcome this?

 

Capture.PNG

 

3 REPLIES 3
ibarrau
Super User
Super User

Hi. If you want to order a column by other value you can do it. Go to Data View and select a column, then under modeling tab you will find a "Sort Column by" or something like that. Check the picture out:

sort col bysort col by

For more info: https://docs.microsoft.com/en-us/power-bi/desktop-sort-by-column#sort-using-the-sort-by-column-butto...

 

Regards,

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


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

Happy to help!

LaDataWeb Blog

Anonymous
Not applicable

@ibarrau  I tried to sort Destination Town by Destination Town Index but got the following error

 

Capture.PNG

Check the data. This will only work if you have a town destination for each town id. Your Town 3 has two values (2 and 3). If you correct this kind of things it will let you do it.

 

Regards,


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

Happy to help!

LaDataWeb Blog

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