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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
sophie63
Helper I
Helper I

Using RELATED()

RELATED.PNGHi,

 

 

I have an issue when using the RELATED() function. I have a Many to One relationship between the table CON and the table MPPAYERS but when I try to create a calculated colum in MPPAYERS to get data from CON (for instance the column [CON_ID]) I have the following error : The name 'RELATED' wasn't recognized. And when I try to create a measure in my report, dooing the same, I have this error: The XXX column either doesn't exist or doesn't have a relationship to any table available in the current context.

 

Could you halp me please?

3 REPLIES 3
Phil_Seamark
Microsoft Employee
Microsoft Employee

Hi @sophie63

 

I think RELATED() would work if you were creating the column in the CON table (the child table) and trying to refrerence data from the parent table.  Whereas I understand REALATEDTABLE() is used from the parent table, or MPPAYERS in this case.

 

Cheers,

 

Phil


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

v-huizhn-msft
Microsoft Employee
Microsoft Employee

Hi @Greg_Deckler,

Because I can not see your detail resource data, I try to reproduce using the following sample table.

1.PNG

In Table, I want to  get Table[QuantityA] value. It returns error when I use RELATED function, there are mutiple Table4 values for each row in Table. I must use a aggregated function. Just as @Greg_Deckler posted, I use the following formula and get expected result.

Result = SUMX(RELATEDTABLE(Table4),Table4[QuantityA])


2.PNG

If you have any issue, please let me know.

Best Regards,
Angelia


 

Greg_Deckler
Community Champion
Community Champion

Try RELATEDTABLE



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.