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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Merging two tables in powerquery that absolutely have nothing in common

Hi all,

I have one table that contains just one column with year and month:

 

Year And Month

2018-01

2018-02

2018-03

….

 

And I have one table with my customer ID’s

 

Customer ID

A1

B2

C3

….

 

I want to combine both tables together in one new table in Powerquery. End result should look like this:

 

Year And Month

Customer ID

2018-01

A1

2018-02

B2

2018-03

C3

2018-01

A1

2018-02

B2

2018-03

C3

2018-01

A1

2018-02

B2

2018-03

C3

 

How to do that?

1 ACCEPTED SOLUTION

Hi @Anonymous,

 

ok, then try following:

  1. Create an index column in the table YearAndMonth.
  2. Create an index column in the table CustomerId.
  3. Merge both tables via the new index column.
  4. Remove columns which you don't need.

I've created a PowerBI file containing all what I have described: PowerBI file

 

A screenshot of creating an index:

Capture1.PNG

And a screenshot of merging:

Capture.PNG

View solution in original post

4 REPLIES 4
Nolock
Resident Rockstar
Resident Rockstar

Hi @Anonymous,

are you sure with the expected result? The three first lines repeat three times...

Anonymous
Not applicable

Hi @Nolock ,

Yes very sure about that. In Excel it's so easy to do, but i just don't know how to pull it off using PowerQuery.

 

Cheers

Bas

Hi @Anonymous,

 

ok, then try following:

  1. Create an index column in the table YearAndMonth.
  2. Create an index column in the table CustomerId.
  3. Merge both tables via the new index column.
  4. Remove columns which you don't need.

I've created a PowerBI file containing all what I have described: PowerBI file

 

A screenshot of creating an index:

Capture1.PNG

And a screenshot of merging:

Capture.PNG

Anonymous
Not applicable

Hi @Nolock ,

That's a brilliant workaround, I would have never thought about that.

Thanks so much for helping me with finding the right solution!

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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.