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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Combining 2 columns from 2 different tables into one column

Hi All,

Please kindly can you help!

I have 2 tables as showing below 

Table 1 name = "TableA"

DLL Business UnitOpportunity Name/ FO Application #Customer NameAccount Name (Originator)First Docs In Date/TimeNet NBVSales Support OwnerSales StageSales Sub StageReason for Audit Rejection
Constr. Transp. & Industrial8.2621E+13D O Constable ContractorErnest Doe & Sons Ltd25/03/2020 08:43 UK_SPOC_CV_Flow_WIP4.Accepted4.5 Clarification on docsCredit;Fraud Checklist

 

Table 2 name = "TableB"

BUContract NoDate & Time ReceivedCustomer name
Constr. Transp. & Industrial8262145001911926/03/2020 10:08JHD Bowen Building Contractor

 

 

Question Please;

- I would like to extract all the data in column "Opportunity Name/ FO Application #" from TableA, and all the data in column "Contract No" in TableB. As you notice there is no direct link between the 2 tables. Is there a solution to pull all the data from the 2 columns in to one column (only distinct value)? Many thanks 

Kind Regards

Sarmad Dra

1 ACCEPTED SOLUTION

Hi @Anonymous ,

 

It seems that you are missing a ")"that will occur such error:

Annotation 2020-04-01 170827.png

 

I tested again and the function works fine.

Annotation 2020-04-01 171417.png

 

Here is a sample .pbix file you can refer to.

 

Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
 

View solution in original post

6 REPLIES 6
v-kelly-msft
Community Support
Community Support

Hi  @Anonymous ,

 

Create a table using below dax expression:

 

 

Table C= UNION(ALL(TableA[Opportunity Name/ FO Application #]) , ALL(TableB[Contract No]) ))

 

 

 

Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
Anonymous
Not applicable

when I use the following; 

Table C= UNION(ALL(TableA[Opportunity Name/ FO Application #]) , ALL(TableB[Contract No]) ))

I am getting this error "Too few arguments were passed to the UNION function. The minimum argument count for the function is 2."

Do you know whye?

Thank you,

Sam

amitchandak
Super User
Super User

You can create a new table like this

distinct(union(all(TableA[Opportunity Name/ FO Application #]) , all(TableB[Contract No]) ))
Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

when I use the following; 

distinct(union(all(TableA[Opportunity Name/ FO Application #]) , all(TableB[Contract No]) ))

 

I am getting this error "Too few arguments were passed to the UNION function. The minimum argument count for the function is 2."

Do you know whye?

Thank you,

Sam

Hi @Anonymous ,

 

It seems that you are missing a ")"that will occur such error:

Annotation 2020-04-01 170827.png

 

I tested again and the function works fine.

Annotation 2020-04-01 171417.png

 

Here is a sample .pbix file you can refer to.

 

Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
 
edhans
Super User
Super User

Yes, you would do this in Power Query using a Cartesian Join, but I'll need good data to play with. See the links below. I cannot use what you pasted in because it is not in a table format and I'll spend more time cleaning up random spaces and special char 160 spaces than actually working on the problem.

 

How to get good help fast. Help us help you.
How to Get Your Question Answered Quickly
How to provide sample data in the Power BI Forum



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.