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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

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
May Power BI Update Carousel

Power BI Monthly Update - May 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.