Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Frequent Visitor

Table Relationship not working with RELATED

I have created groups (bins) for lengths of fish, when using those groups as a legend the sort is ordered incorrectly. I have created the custom sort table with the order I would like them in and also created the relationship which is 1:Many between my groups in the original table and the sort table I just made. When trying to create a Custom Sort column using RELATED it tells me the relationship does not exist. When using RELATEDTABLE it refers to the measure not specifying an aggregation. My question is: am I able to sort by a grouped value? Any help would be greatly appreciated.



Community Support
Community Support

Hi @nickhukriede ,


Do you want to group values in different intervals? And use this column to establish relationships with other tables?
Please give us a sample data.


Best regards,
Lionel Chen

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


It is odd that you bins are not in the right order.  You have already adjust sorting on the visual itself to confirm it is using your bins column to sort?  In any case, I usually use a switch function in the sort by column if there is a small number of items to sort.  For example 


SortColumn = Switch(Table[ColumnToSort], "B", 1, "A", 2, "C", 3)


If this works for you, please mark it as the solution.  Kudos are appreciated too.  Please let me know if not.



Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.

@mahoneypa HoosierBI on YouTube

Helpful resources

PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors