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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Deeks
Frequent Visitor

Related tables - not sure what I'm doing wrong

Hi, I have three tables linked to each other. Let's call them table A, B, C

 

I am trying to check whether an order number in A, exists in B and C. I would have liked to create two columns in table A; one would show whether that order no. is within B and the second column to show existence in C. However, I am unable to do this, when using the RELATE function. 

 

I am able to do this separately, within table B and C. But this does not help when trying to show the information in report view. It seems like the relationships are incorrectly setup. 

 

The relationships that are setup are 

Table B to A (many to one) 
Table C to A (many to one) 

 

I have tried to setup the following 

Table A to B (one to many)

Table A to C (one to many) 

but this is automatically reverted to the former relationships.

 

FYI - I am not very good with relationships and cardinality so please bare that in mind when responding, thank you! 🙂  

1 ACCEPTED SOLUTION
edhans
Super User
Super User

You can do this with the CONTAINS() function. If you are adding a column, you could use this as a Calculated Column:

CONTAINS ( store, Store[CountryRegion], ThisTable[CountryRegion])


This would look up the CountryRegion field in this table and see if it exists in the Store table in the CountryRegion field there and return TRUE or FALSE.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

View solution in original post

1 REPLY 1
edhans
Super User
Super User

You can do this with the CONTAINS() function. If you are adding a column, you could use this as a Calculated Column:

CONTAINS ( store, Store[CountryRegion], ThisTable[CountryRegion])


This would look up the CountryRegion field in this table and see if it exists in the Store table in the CountryRegion field there and return TRUE or FALSE.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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