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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Sept PBI Carousel

Power BI Monthly Update - September 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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

Top Kudoed Authors