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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! 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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.