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
sebastienke
Helper III
Helper III

How to combine data of 2 tables into 1 with power BI DESKTOP (and not QUERY)

Hi all, 

 

I have two tables, and I want to create a third table to list all the possible combination of 2 first tabkles.

 

Table 1 (1 column) :

A

B

C

 

Table 2 (1 column) :

1

2

 

What I want is table 3 (2 columns) :

A | 1

A | 2

B | 1

B | 2

C | 1

C | 2

 

Actually A, B, C... are data that are calculated in power DESKTOP (and not Query) based on other data not mentionned above, so I need to create this third table in power desktop (because those data don't exist in the Query).

 

Anyone to help me on this ?

 

Thank you

Seb

 

1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

@sebastienke  - Use GENERATE


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

4 REPLIES 4
Greg_Deckler
Super User
Super User

@sebastienke Yes, use SELECTCOLUMNS inside of your GENERATE


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

So obvious... Thanks @Greg_Deckler 

Greg_Deckler
Super User
Super User

@sebastienke  - Use GENERATE


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Thank you @Greg_Deckler 

It works perfectly.

In order to optimize my file, do you know how can i do the same thing but just with 1 chosen column of each table to combine in table 3 ?

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.