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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.