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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
nicolasvc
Helper III
Helper III

join cells in a column by month and year

I have a table with a list of products and another that I generate the months and years, and I need to create a table where the products are for each month and year, as shown. How could I do it using DAX?

 

Product
A
B
C

 

YearMonth
20221
20222
20223
......
202312

 

Result

 

YearMonthProduct
20221A
20221B
20221C
20222A
20222B
.........
1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @nicolasvc ,

 

Using DAX you can use the CROSSJOIN sintax:

Table 2 = CROSSJOIN('Table1', 'Table2')

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

2 REPLIES 2
MFelix
Super User
Super User

Hi @nicolasvc ,

 

Using DAX you can use the CROSSJOIN sintax:

Table 2 = CROSSJOIN('Table1', 'Table2')

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



HotChilli
Super User
Super User

In Power Query, add a custom column to the second table (using the interface).  In the dialog box put the name of the first table.

In the next step, expand the table (from the column header).

That should do it

Helpful resources

Announcements
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan NL Carousel

Fabric Community Update - January 2025

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