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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
yaman123
Post Patron
Post Patron

Add a new column with a value from another table

Hi, 

 

This should be so simple to do but I am not getting the results I want. 

 

I would like to add a new column to a table I have created - Account Table. This table has one column - Account Code. The Account Code is taken from the Budget Table. 

 

I would like to add a new column to the Account Table called Account Desc. This is the account desc from the Budget Table. 

 

I have a relationship between the two tables on Account Code 

 

 

7 REPLIES 7
v-janeyg-msft
Community Support
Community Support

Hi, @yaman123 

 

Not very clear about your needs, I don't know the logic of getting Account Desc.

Can you share some sample data (hide privacy) and your desired result? So we can help you soon.

 

Janey

AliceW
Impactful Individual
Impactful Individual

If you have this type of relationship, what line do you want to bring? You have several options in the Budget Table, don't you?

AliceW
Impactful Individual
Impactful Individual

If the relationship is one-to-many, many on the Budget side, it won't work. Otherwise, use RELATED.

Hi,

 

The relationship is one (Account Table) to many (Budget Table) . When I am using Related in a new column in the Account Table, it gives me an error and doesnt recognise the table or fields? 

goncalogeraldes
Super User
Super User

Hello there @yaman123 ! Ideally you can do this in Power Query with the "Merge" option, merging the two tables by the Account code and extracting Account Desc from the Budget Table. 

 

Another way is to use the RELATED() function, like so:

 

New Column = RELATED('Budget Table'[Account Desc])

You can find further documentation here.

 

 

Hope this answer solves your problem!
If you need any additional help please @ me in your reply.
If my reply provided you with a solution, please consider marking it as a solution ✔️ or giving it a kudoe 👍
Thanks!

You can also check out my LinkedIn!

Best regards,
Gonçalo Geraldes

Hi,

 

The relationship is one (Account Table) to many (Budget Table) . When I am using Related in a new column in the Account Table, it gives me an error and doesnt recognise the table or fields? 

@yaman123 That is because the RELATED() function only works from the many to the one side. Try using the LOOKUPVALUE() function then.

 

Further documentation here.

 

Hope this answer solves your problem!
If you need any additional help please @ me in your reply.
If my reply provided you with a solution, please consider marking it as a solution ✔️ or giving it a kudoe 👍
Thanks!

You can also check out my LinkedIn!

Best regards,
Gonçalo Geraldes

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.