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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Matching Columns in 2 Tables

Hi everyone!

 

New PBI user here 🙂 I have a table that has different codes related to dates they were inputted, and I have another table that has those codes and what each code means:

 

Table 1    Table 2     
DateCode CodeMeaning 
7-JanR2 F5 blue  
9-JanF5 T4green 
11-JanC7 C7yellow 
13-JanT4 R2red 
   P6brown 
   L9purple 

 

 

I want a visualization that will show the Meaning of the codes related to the codes on Table 1. I already set a relationship between the "Code" columns in both tables. However, when I do a table visualization with the "Code" Column from Table 1, and the "Meaning" Column in Table 2, they are not matching up. 

 

Please help!!

1 ACCEPTED SOLUTION
v-alq-msft
Community Support
Community Support

Hi, @Anonymous 

 

Based on your description, I created data to reproduce your scenario. It works propperly on my side. The pbix file is attached in the end.

 

Table1:

c1.png

 

Table2:

c2.png

 

There is a relationship between two tables.

Result:

c3.png

 

You may also create a measure as below.

Meaning Measure = 
MAXX(
    FILTER(
        ALL(Table2),
        Table2[Code]=SELECTEDVALUE(Table1[Code])
    ),
    [Meaning]
)

 

Result:

c4.png

 

Best Regards

Allan

 

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
v-alq-msft
Community Support
Community Support

Hi, @Anonymous 

 

Based on your description, I created data to reproduce your scenario. It works propperly on my side. The pbix file is attached in the end.

 

Table1:

c1.png

 

Table2:

c2.png

 

There is a relationship between two tables.

Result:

c3.png

 

You may also create a measure as below.

Meaning Measure = 
MAXX(
    FILTER(
        ALL(Table2),
        Table2[Code]=SELECTEDVALUE(Table1[Code])
    ),
    [Meaning]
)

 

Result:

c4.png

 

Best Regards

Allan

 

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

Anonymous
Not applicable

Thank you! The measure worked!

HotChilli
Super User
Super User

None of them match up or just some?

 

Check for the same data type in both tables.

Check for spaces or other hidden characters.

You can clean the data in Power Query using Trim or Clean

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.