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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

How to create a table with two new columns based on the two tables of values in Power Query

I have one table with one column called stores:

 

Stores

A

B

C

 

 

And I have another table called channels:

 

Channels

1

2

3

 

 

I need to create a new table with two columns "Stores" and "Channels" like this in Power Query

 

Stores      Channels

A              1

A              2

A              3

B              1

B              2

B              3

C              1

C              2

C              3

 

For each store, there will be 3 channels. 

 

Is there any way to achieve this in Power Query? Thank you!

1 ACCEPTED SOLUTION
NishPatel
Resolver II
Resolver II

Import both tables into the Power Query. Select Stores table and add Custom Column Channels and Enter formula = #"Channels"[Channels]. Expand the Channels column by selecting Expand to New Rows. And you will achive what you need as below.

NishPatel_0-1664971028524.png

 

View solution in original post

5 REPLIES 5
NishPatel
Resolver II
Resolver II

Import both tables into the Power Query. Select Stores table and add Custom Column Channels and Enter formula = #"Channels"[Channels]. Expand the Channels column by selecting Expand to New Rows. And you will achive what you need as below.

NishPatel_0-1664971028524.png

 

Anonymous
Not applicable

Thank you very much. It works!

HotChilli
Super User
Super User

https://learn.microsoft.com/en-us/power-query/add-custom-column 

Have a read of this then try my suggestion.

Work your way through it and I will help if you have specific problems

Anonymous
Not applicable

Thank you! I don't quite get what you meant. Would it be possible to add a few more detailed steps like screenshots etc? 

HotChilli
Super User
Super User

Add a custom column to table1 with the name of the other table and column , for example, 

Table2[theColumn]

then expand to new rows

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.