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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
EnsFlynn
Frequent Visitor

RELATED() not working properly, despite Many to 1 relationship

I'm trying to create a column in a table that is based on the value of two other columns. In both tables I have created a column that is just the two columns concatenated so as to make a composite key I can use for a Many:1 relationship. I have set up the relationship successfully and it is active as a Many:1, yet when I try to use RELATED in a new column for the Many table, it says that it either doesn't exist or has no relationship to any table in the context

 

related bug.PNG

 

NewTargets is the 1 table in the 1:Many, and the related by a column CompKey. I'm completely stumped as to why the RELATED function doesn't work here

1 ACCEPTED SOLUTION
EnsFlynn
Frequent Visitor

Ok well I managed to fix my problem soon after posting this. For some reason I was under the impression that RELATED required a 1:many or Many:1 relationship, when it actually needs a 1:1 relationship. 1:Many relationships should be handles by RELATEDTABLE and used as input tables for expressions (in my case I used MAXX).

View solution in original post

1 REPLY 1
EnsFlynn
Frequent Visitor

Ok well I managed to fix my problem soon after posting this. For some reason I was under the impression that RELATED required a 1:many or Many:1 relationship, when it actually needs a 1:1 relationship. 1:Many relationships should be handles by RELATEDTABLE and used as input tables for expressions (in my case I used MAXX).

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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