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
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
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.