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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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