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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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

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
TYOzzy
Frequent Visitor

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

v-rzhou-msft
Community Support
Community Support

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

 

 

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.

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

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

johnce123_0-1606212179456.png

 

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.