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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

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
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.