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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
nickhukriede
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.

 

Thanks.

2 REPLIES 2
v-lionel-msft
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.

mahoneypat
Microsoft Employee
Microsoft Employee

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.

Regards,

Pat





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

Announcements
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.