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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
TaxiDriveDax
Frequent Visitor

Pull a field from a many to many relationship

Hi, 

I am trying to pull value of field from a table to another one. Just that there're connected through  a many to many relationship.

 

I tested the LookupValue, Relatetable, distinct fonction  but none couldn't get me the expected values.

 

I then please need other suggestions.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi  @TaxiDriveDax ,

I created some data:

TableA:

vyangliumsft_0-1675846441487.png

TableB:

vyangliumsft_1-1675846441489.png

 

Here are the steps you can follow:

1. Create calculated column.

Flag =
MAXX(
    FILTER(ALL(TableA),
    'TableA'[Column1]=EARLIER('TableB'[Column1])&&
    'TableA'[Column2]=EARLIER('TableB'[Column2])&&
    'TableA'[Column3]=EARLIER('TableB'[Column3])),'TableA'[Column4])

2. Result:

vyangliumsft_2-1675846441490.png

 

Best Regards,

Liu Yang

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

3 REPLIES 3
Anonymous
Not applicable

Hi  @TaxiDriveDax ,

I created some data:

TableA:

vyangliumsft_0-1675846441487.png

TableB:

vyangliumsft_1-1675846441489.png

 

Here are the steps you can follow:

1. Create calculated column.

Flag =
MAXX(
    FILTER(ALL(TableA),
    'TableA'[Column1]=EARLIER('TableB'[Column1])&&
    'TableA'[Column2]=EARLIER('TableB'[Column2])&&
    'TableA'[Column3]=EARLIER('TableB'[Column3])),'TableA'[Column4])

2. Result:

vyangliumsft_2-1675846441490.png

 

Best Regards,

Liu Yang

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

TaxiDriveDax
Frequent Visitor

sure :

TABLE A is related to TABLE B on a many to many Relationship.

Table A
Column1    Column2     Column3    Column4 (type Text)

 

Then the expect result is to have in TABLE B the below Structure

Table B
Column1  Column2   Column3       CalculateColumn (Table A.Column4) 
FreemanZ
Super User
Super User

hi @TaxiDriveDax 

could you paste some sample data?

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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