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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
joebc
Frequent Visitor

how to insert or combine a list or table for each row in another table?

hi all, I can't figure out how to take one table or list and insert it  or combine it with another table for each row... For example I would like to combine  table 1 and 2 to make table 3 below...

Table 1

Region

City
NorthMy Town
NorthYour Town
NorthNext Town

 

Table 2

Code

000

001
020
030

 

Table 3

RegionCityCode
NorthMy Town000
NorthMy Town

001

NorthMy Town020
NorthMy Town030
NorthYour Town000
NorthYour Town001
NorthYour Town020
NorthYour Town030
NorthNext Town000
NorthNext Town001
NorthNext Town020
NorthNext Town030

 

any assistance would be greatly appreciated!

Thanks

1 ACCEPTED SOLUTION
edhans
Super User
Super User

Hi @joebc,

 

This is an essentially a Cartesian Join. Just add a column in your Region table that is your full Codes query. The formula is simply = Codes, or =#"Long query name" if it has spaces or special characters in it. Then expand it with the button on the upper right of my Code Data column I added.

2020-04-28 13_01_16-book2 - Excel.png

 

You get this:

 

2020-04-28 13_01_24-book2 - Excel.png

 

Here is my PBIX file if you want to look at it.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

View solution in original post

1 REPLY 1
edhans
Super User
Super User

Hi @joebc,

 

This is an essentially a Cartesian Join. Just add a column in your Region table that is your full Codes query. The formula is simply = Codes, or =#"Long query name" if it has spaces or special characters in it. Then expand it with the button on the upper right of my Code Data column I added.

2020-04-28 13_01_16-book2 - Excel.png

 

You get this:

 

2020-04-28 13_01_24-book2 - Excel.png

 

Here is my PBIX file if you want to look at it.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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