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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Combine data from two tables into two different columns

Hi,

 

I want to create two measures that i can drag into a table visual against a common column.

 

The data is as following

Table 1:

deedeedudu_0-1653481663008.png

 

Table 2

deedeedudu_1-1653481678308.png

 

Final Desired Table- I wish to drag contact_id from Table 1 and the two measures to give following

deedeedudu_2-1653481737439.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

Please refer to my pbix file to see if it helps you.

The first way:
Using @Tahreem24 's method: Create relationship

vpollymsft_0-1653890676615.png

vpollymsft_1-1653890703438.png

Another way: Do not need to create relationships. 

Create a measure:

vpollymsft_2-1653890756040.png

Measure =
CALCULATE (
    MAX ( 'Table'[Segment] ),
    FILTER (
        ALL ( 'Table' ),
        'Table'[CONTACT_ID] = SELECTEDVALUE ( Table_1[contact_id] )
    )
)

vpollymsft_3-1653890812033.png

Best Regards

Community Support Team _ Polly

 

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
Anonymous
Not applicable

Hi @Anonymous ,

Please refer to my pbix file to see if it helps you.

The first way:
Using @Tahreem24 's method: Create relationship

vpollymsft_0-1653890676615.png

vpollymsft_1-1653890703438.png

Another way: Do not need to create relationships. 

Create a measure:

vpollymsft_2-1653890756040.png

Measure =
CALCULATE (
    MAX ( 'Table'[Segment] ),
    FILTER (
        ALL ( 'Table' ),
        'Table'[CONTACT_ID] = SELECTEDVALUE ( Table_1[contact_id] )
    )
)

vpollymsft_3-1653890812033.png

Best Regards

Community Support Team _ Polly

 

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

 

 

 

 

Tahreem24
Super User
Super User

@Anonymous You need to have a relationship between these two tables based on common key (let's say Contact_ID) then you can drag them all together.

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.