Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowJuly 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more
I have 2 tables "similar" to below
Table 1
| ID | Company Code | Country | City |
| 1 | 50 | Blah | Blah |
| 2 | 60 | Blah | Blah |
| 3 | 50 | Blah | Blah |
| 4 | 31 | Blah | Blah |
Table 2
| ID | Company Code | Company Name | Country | City |
| 1 | 50 | Company 1 | Blah | Blah |
| 2 | 60 | Company 2 | Blah | Blah |
| 3 | 50 | Company 1 | Blah | Blah |
| 4 | 30 | Company 3 | Blah | Blah |
How can I get the "Company Name" column in "Table 2" to display in "Table 1" so it puts the correct "Company Name" alongside the associated"Company Code" and if there is no corrosponding "Company Code" in "Table 2", then leave "Blank". Similar to below...
Table 1
| ID | Company Code | Company Name | Country | City |
| 1 | 50 | Company 1 | Blah | Blah |
| 2 | 60 | Company 2 | Blah | Blah |
| 3 | 50 | Company 1 | Blah | Blah |
| 4 | 31 | Blah | Blah |
I am unsure the best approach to do this. Thanks in advance.
Solved! Go to Solution.
Hi @StuartSmith
Create an active relationship between Table 1 and Table 2 based on a common column like ID or Company Code.
Now go to your Table 1, add a new column and use below DAX;
CompanyName=RELATED(Table2[Company Name])
Thanks,
Sanket.
If this post helps, then mark it as "Accept as Solution" and give it a thumbs up.
Hi, how are u?
First of all you should create a relation between these tables in here:
You just need to drag "Company" from table1 to "Company" from table2.
After, if you move the information from different table in the same chart, the information will match.
Regards!
Hi @StuartSmith
Create an active relationship between Table 1 and Table 2 based on a common column like ID or Company Code.
Now go to your Table 1, add a new column and use below DAX;
CompanyName=RELATED(Table2[Company Name])
Thanks,
Sanket.
If this post helps, then mark it as "Accept as Solution" and give it a thumbs up.
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!
Check out the July 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 31 | |
| 28 | |
| 24 | |
| 24 | |
| 19 |
| User | Count |
|---|---|
| 44 | |
| 32 | |
| 17 | |
| 17 | |
| 17 |