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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
johnce123
Helper I
Helper I

Custom Data Sorting

Good Morning, 

 

Im trying to sort my data into a custom sort  (Acc sub category).  I have created a seperate table and taken the Unique values attributed to the Acc Sub cateogires and given them a sort order and connected the tables.

I however cant find the area where you tell it to use this connected table in the modelling section (like ive seen on examples) and only have the option to sort with current columns in the same table.  Help appreciate TIA

johnce123_0-1606211254732.png

johnce123_1-1606211338628.png

johnce123_2-1606211422185.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @johnce123 

I update my data models and connect two tables by this unique number column.

Data Table:

1.png

Sort Table:

2.png

Relationship:

3.png

Finally result is corret.

4.pngYou can download the pbix file from this link: Custom Data Sorting

 

Best Regards,

Rico Zhou

 

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

8 REPLIES 8
Anonymous
Not applicable

I have literally spent days trying to get this column to sort chronologically.   I made a separate table with a month name and number, but it still doesn't sort correctly.  Please see the example.  I'm at my wits end here.  I've read so many posts and watch so many videos.  This looks like it should work to me, but it's not.  Absolutely any help would be greatly appreciated.  

TYOzzy_0-1607912993031.png

Thanks in advance!

Tara

Anonymous
Not applicable

Hi @johnce123 

If you sort the Acc sub category column in your seperate table (Sort Table as below), this won't affect the Acc sub category column in your data table.

You may try to build a calculated sort column in Date table and sort the Acc sub category column in Date table.

My Data Table:

1.png

My Sort Table:

2.png

Relate two tables by Acc Sub Category columns.

Calculated column:

 

Acc Sub Sort = RELATED(Sort[Sort])

 

Sort Acc Sub Category column in Date Table by this Sort column and result is as below.

4.png

Or you can use Acc Sub Category column in Sort Table directly.

3.png

You can download the pbix file from this link: Custom Data Sorting

 

Best Regards,

Rico Zhou

 

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

Many thanks for your reply. 

 

I am getting this info now, i have connected the two tables by the unique entry number for Acc Sub category

johnce123_0-1606376947318.png

 

johnce123_1-1606376989602.png

 

 

Anonymous
Not applicable

Hi @johnce123 

I update my data models and connect two tables by this unique number column.

Data Table:

1.png

Sort Table:

2.png

Relationship:

3.png

Finally result is corret.

4.pngYou can download the pbix file from this link: Custom Data Sorting

 

Best Regards,

Rico Zhou

 

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

amitchandak
Super User
Super User

@johnce123 , check what is sorted on the matrix under 3 dots. Can you share a sample pbix after removing sensitive data.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

To be honest im very new to this, only started learning last week.  How do i share the data Pbix without sensitive info (sorry)

johnce123_0-1606213511271.png

 

amitchandak
Super User
Super User

@johnce123 , not very clear. In this new table, click on the Account sub category, You will see the sort option under column tools

https://docs.microsoft.com/en-us/power-bi/desktop-sort-by-column

Sortnewribbion.png

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

I tried that but it hasnt done what im expecting and has kept it in alphabetical order

johnce123_0-1606212179456.png

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.