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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
jdubs
Helper V
Helper V

How to create a new table using columns from multiple tables?

I know this is probably a repeat question as I have seen several different answers but none of them seem to solve my particular requirement.

 

I have 3 tables: Phone Call records, Accounts & Contacts where there are relationships from the Phone Calls to the Account and/or Contact keyed off of the Phone Number. I want to create a new table that merges the 3 so I have a complete set of data, containing the Call Time, Phone Number, Account & Contact (and a few other relevant fields.) I already have this presented in a table visual but I need to recreate it on the backend.

 

I tried SUMMARIZECOLUMNS but Power BI hangs on "Working on it" for hours until eventually it consumes all the memory on my desktop (12Gb)

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @jdubs ,

You can create a table visual as below directly to achieve it:

create table.JPG

However, if you want to get a fact table, you can make Merge transformation for these three tables.

let
    Source = Table.NestedJoin(Phone_Calls, {"Phone Number"}, Accounts, {"Phone Number"}, "Accounts", JoinKind.LeftOuter),
    #"Expanded Accounts" = Table.ExpandTableColumn(Source, "Accounts", {"Account"}, {"Account"}),
    #"Merged Queries" = Table.NestedJoin(#"Expanded Accounts", {"Phone Number"}, Contacts, {"Phone Number"}, "Contacts", JoinKind.LeftOuter),
    #"Expanded Contacts" = Table.ExpandTableColumn(#"Merged Queries", "Contacts", {"Contact"}, {"Contact"})
in
    #"Expanded Contacts"

merge queries.JPG

Best Regards

Rena

View solution in original post

4 REPLIES 4
parry2k
Super User
Super User

@jdubs can you share relationship diagram between these tables, also if possible, share sample data and expected output.

 

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!

Visit us at https://perytus.com, your one-stop shop for Power BI related projects/training/consultancy.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Hi!

 

Yep, here is the diagram:

 

jdubs_0-1594673431993.png

 

And sample tables and data:

 

Phone Calls Table

 

jdubs_0-1594674083484.png

 

Accounts Table

 

jdubs_1-1594674113697.png

 

Contacts Table

 

jdubs_2-1594674146552.png

 

And I would like my expected output table to look like this:

 

Matched Calls Table

 

jdubs_3-1594674207084.png

 

 

 

 

 

 

 

 

Anonymous
Not applicable

Hi @jdubs ,

You can create a table visual as below directly to achieve it:

create table.JPG

However, if you want to get a fact table, you can make Merge transformation for these three tables.

let
    Source = Table.NestedJoin(Phone_Calls, {"Phone Number"}, Accounts, {"Phone Number"}, "Accounts", JoinKind.LeftOuter),
    #"Expanded Accounts" = Table.ExpandTableColumn(Source, "Accounts", {"Account"}, {"Account"}),
    #"Merged Queries" = Table.NestedJoin(#"Expanded Accounts", {"Phone Number"}, Contacts, {"Phone Number"}, "Contacts", JoinKind.LeftOuter),
    #"Expanded Contacts" = Table.ExpandTableColumn(#"Merged Queries", "Contacts", {"Contact"}, {"Contact"})
in
    #"Expanded Contacts"

merge queries.JPG

Best Regards

Rena

Thank you. I used the 'Merge query as New' function and was able to create the table I need. I didn't realize it was that simple.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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