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

Repeat Date Values for Each Unique Part Number

Hi All,

 

My asks always seem to be relatively simple for the experts on this forum. My (hopefully simple) question can be displayed in the attached picture. What I am trying to do in the query editor is take the dates in my Date table and apply them to each unique part number in Table1 to get Table2 in the attached picture.

Capture.JPG

 

Is this possible? Thanks in Advance!

2 ACCEPTED SOLUTIONS
AlB
Super User
Super User

Hi @Anonymous 

 

You seem to need a crossjoin of the two tables.  Check this out:

https://exceleratorbi.com.au/cross-join-with-power-query/

 

View solution in original post

TomMartens
Super User
Super User

Hey, 

 

basically the answer is in a way simple, but also by no measn obvious 🙂

 

Here are some screenshots how to expand the Calendar table with Part Number column from the Parts table.

 

Select the Calendar table and choose the command "Custom Column" from the Add Column menu:

And just type the name of the Parts table ...

image.png

It does not matter how you name the column, after you choose OK, the Calendar table should look like the:

image.png

 

just hit the "expand" icon, and the next dialog will look like this:

image.png

This dialog allows to select the columns you want to "select" from the Parts table.

Personally I prefer to deselect naming option, but this is my personal taste. After choosing "OK" you're done ...

image.png

 

You're done!

 

Please be aware that this is the simplest of all possible joins, creating a cartesian product of combinations. This often is quite useful, but be sure that you want what you get, meaning you should consider if the result is also valid if the rows in both tables are not unique ...

 

Regards,

Tom

 

 

 

 

 



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

View solution in original post

3 REPLIES 3
TomMartens
Super User
Super User

Hey, 

 

basically the answer is in a way simple, but also by no measn obvious 🙂

 

Here are some screenshots how to expand the Calendar table with Part Number column from the Parts table.

 

Select the Calendar table and choose the command "Custom Column" from the Add Column menu:

And just type the name of the Parts table ...

image.png

It does not matter how you name the column, after you choose OK, the Calendar table should look like the:

image.png

 

just hit the "expand" icon, and the next dialog will look like this:

image.png

This dialog allows to select the columns you want to "select" from the Parts table.

Personally I prefer to deselect naming option, but this is my personal taste. After choosing "OK" you're done ...

image.png

 

You're done!

 

Please be aware that this is the simplest of all possible joins, creating a cartesian product of combinations. This often is quite useful, but be sure that you want what you get, meaning you should consider if the result is also valid if the rows in both tables are not unique ...

 

Regards,

Tom

 

 

 

 

 



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany
Anonymous
Not applicable

This works perfect. Thank you very much.

AlB
Super User
Super User

Hi @Anonymous 

 

You seem to need a crossjoin of the two tables.  Check this out:

https://exceleratorbi.com.au/cross-join-with-power-query/

 

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.