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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
ballist1x
Helper III
Helper III

Creating a single table from 2 tables

Hi i am trying to create a single table in BI combined from 2 separate data sources.

 

i only need to use one column, i.e the account number.

 

Both tables will include data that is duplicated and each table will also have unique values and i want to create a single map table of all account numbers that appear in both of the previous tables to create a master table.

 

what is the easiest way to do this?

 

 

2 ACCEPTED SOLUTIONS
Stachu
Community Champion
Community Champion

in Power Query (replace the red code with your references)

let
    Tab1 = Table1,
    Tab1_single_column = Table.SelectColumns(Tab1,{"Id"}),
    Tab2 = Table2,
    Tab2_single_column = Table.SelectColumns(Tab2,{"Id"}),
    #"Appended Query" = Table.Combine({Tab1_single_column, Tab2_single_column}),
    #"Removed Duplicates" = Table.Distinct(#"Appended Query")
in
    #"Removed Duplicates"


Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

View solution in original post

Kasunpathirana
Resolver I
Resolver I

Append.png

Use the Append Query and then You would arrive at below result

 

result.png

 

Then you can right click on the account number and click Remove Duplicates. This will help to remove the duplicated Account Value. Finally you will arrive at below.

 

Last.png

Hope this helps Smiley Wink 

View solution in original post

2 REPLIES 2
Kasunpathirana
Resolver I
Resolver I

Append.png

Use the Append Query and then You would arrive at below result

 

result.png

 

Then you can right click on the account number and click Remove Duplicates. This will help to remove the duplicated Account Value. Finally you will arrive at below.

 

Last.png

Hope this helps Smiley Wink 

Stachu
Community Champion
Community Champion

in Power Query (replace the red code with your references)

let
    Tab1 = Table1,
    Tab1_single_column = Table.SelectColumns(Tab1,{"Id"}),
    Tab2 = Table2,
    Tab2_single_column = Table.SelectColumns(Tab2,{"Id"}),
    #"Appended Query" = Table.Combine({Tab1_single_column, Tab2_single_column}),
    #"Removed Duplicates" = Table.Distinct(#"Appended Query")
in
    #"Removed Duplicates"


Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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