cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
jschubert Frequent Visitor
Frequent Visitor

Using calculated tables to combine two unrelated columns from two different tables

Hi All,

 

First time posting here. I am looking for some help with the following issue if it is possible.

 

I am hoping to merge two columns from two unrelated tables so that there would be 1 row for each combination of records, essentially repeating column 1 for each distinct record from column 2. I have attempted many different DAX functions but always run into errors, usually "A table of multiple values was supplied where a single value was expected."

 

Here is an example of what I am trying to acheive.

 

 

 

Power BI example.jpg

 

Thanks a lot!

2 ACCEPTED SOLUTIONS

Accepted Solutions
Super User
Super User

Re: Using calculated tables to combine two unrelated columns from two different tables

@jschubert go to model tab and click "new table" and enter following expression:

 

Table Combine = CROSSJOIN ( Table1, Table2 )

Table combine will have expected result.




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

Proud to be a Datanaut! Connect with me on Linkedin






Community Support Team
Community Support Team

Re: Using calculated tables to combine two unrelated columns from two different tables

Hi @jschubert 

You may also use GENERATE Function.

Table 3 = GENERATE('Table 1','Table 2')

Regards,

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
3 REPLIES 3
Super User
Super User

Re: Using calculated tables to combine two unrelated columns from two different tables

@jschubert go to model tab and click "new table" and enter following expression:

 

Table Combine = CROSSJOIN ( Table1, Table2 )

Table combine will have expected result.




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

Proud to be a Datanaut! Connect with me on Linkedin






Community Support Team
Community Support Team

Re: Using calculated tables to combine two unrelated columns from two different tables

Hi @jschubert 

You may also use GENERATE Function.

Table 3 = GENERATE('Table 1','Table 2')

Regards,

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
jschubert Frequent Visitor
Frequent Visitor

Re: Using calculated tables to combine two unrelated columns from two different tables

Both methods worked for what I was trying. Thanks a lot!