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

July 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more

Reply
FabMann
Frequent Visitor

Power Query: Create a table from two different tables

Hello, I have two different tables (Table A, and Table B) with these fields

Table A

DateUser Id

 

Table B

Dateemail

 

I would like to create a third table (Table C) on Power Query with these fields

DateCount idCount email

 

I'm not really good with power Query so I can't get it how to do it.

I am using Table.SelectColumns() but in this way I can only select one table and some columns from that table. I should need a sort of a join between the two tables and then a distinct count.

Can anyone help me?

Thank you very much

1 REPLY 1
bolfri
Solution Sage
Solution Sage

Try this steps:

Import Table A (mySample)

bolfri_1-1677772110433.png

 

Import Table B (mySample)

bolfri_2-1677772128691.png

 

New Source > Blank Query

Create a new table with combination of Dates from Table A and Table B

= Table.Combine({Table.SelectColumns(#"Table A",{"Date"}),Table.SelectColumns(#"Table B",{"Date"})})

bolfri_3-1677772214256.png

 

= Table.Distinct(Source)

We want only unique values, so use Distinct.

bolfri_4-1677772240271.png

 

Merge Table A and Table B on Date column.

bolfri_5-1677772333840.png

 

Expand Table A ussing Aggregate "Count (Not Blank) of User ID"

bolfri_9-1677772587159.png

 

Expand Table B using Aggregate "Count of Email"

bolfri_10-1677772609959.png

 

FINAL RESULT:

bolfri_11-1677772639830.png

 

PBIX FILE: https://we.tl/t-ysyNlMBzuu

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

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

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.