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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
July 2024 Power BI Update

Power BI Monthly Update - July 2024

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

July Newsletter

Fabric Community Update - July 2024

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