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

Get Fabric Certified for FREE during AI Skills Fest. This week only. Secure your voucher now.

Reply
Anonymous
Not applicable

Why this RELATED function does not work?

Hello

 

Can you tell me please why this formula does not work?

 

 

CALCULATE(COUNT(DifferentTable[Col1]),filter(DifferentTable,DifferentTable[Col2]=RELATED(SameTable[Col1])))

 

 

I get the following error:

 

The column 'SameTable[Col1]' either doesn't exist or doesn't have a relationship to any table available in the current context.

 

 

Thanks!

 

1 ACCEPTED SOLUTION
v-yingjl
Community Support
Community Support

Hi @Anonymous ,

Is there any relationship between these two tables? 

If there is no relationship between them, you cannot use related() function. If they have a relationship actually, try to use relatedtable() function.

Related() is used to refer to One side of a relationship. 

RELATEDTABLE() refer to the many side.

Please refer this article about related and relatedtable: Related and RelatedTable – DAX for Power Pivot, Power BI and SSAS 

 

Best Regards,
Yingjie Li

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-yingjl
Community Support
Community Support

Hi @Anonymous ,

Is there any relationship between these two tables? 

If there is no relationship between them, you cannot use related() function. If they have a relationship actually, try to use relatedtable() function.

Related() is used to refer to One side of a relationship. 

RELATEDTABLE() refer to the many side.

Please refer this article about related and relatedtable: Related and RelatedTable – DAX for Power Pivot, Power BI and SSAS 

 

Best Regards,
Yingjie Li

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

Mariusz
Community Champion
Community Champion

Hi @Anonymous 

 

You can use related if you are trying to reach a column in a table that on one side (1:*) of the relationship.

What is that you are trying to achieve and are you creating a Column or Measure?

 

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
LinkedIn

 

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.