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