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

How to Merge Two Tables (Vertical Merge)

I want to merge below two tables in Power BI. They have same columns, so I hope to vertically merge below two tables.

I know the best way is to go to "Edit Queries"->"Append Queries". However, as these two tables are generated by DAX from other tables, they cannot be shown in Power Query Editor. So I don't know what to do with this situation. 

 

 Capture3.PNGCapture6.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
JosefPrakljacic Established Member
Established Member

Re: How to Merge Two Tables (Vertical Merge)

Hey @matthewtian777 ,

 

I actually don't understand what you mean by "vertically merge"

 

If you want to use the equivalent of "Append Queries" -> You could use the UNION-TableFunction.

 

If you need to join the tables in DAX you could use

  • NATURALLEFTOUTERJOIN
  • NATURALINNERJOIN
  • ADDCOLUMNS

If this post was helpful may I ask you to mark it as solution and give it some kudos?

Have a nice day!

BR,
Josef

View solution in original post

2 REPLIES 2
JosefPrakljacic Established Member
Established Member

Re: How to Merge Two Tables (Vertical Merge)

Hey @matthewtian777 ,

 

I actually don't understand what you mean by "vertically merge"

 

If you want to use the equivalent of "Append Queries" -> You could use the UNION-TableFunction.

 

If you need to join the tables in DAX you could use

  • NATURALLEFTOUTERJOIN
  • NATURALINNERJOIN
  • ADDCOLUMNS

If this post was helpful may I ask you to mark it as solution and give it some kudos?

Have a nice day!

BR,
Josef

View solution in original post

matthewtian777 Frequent Visitor
Frequent Visitor

Re: How to Merge Two Tables (Vertical Merge)

@JosefPrakljacic Thank you, Josef! The UNION function is exactly what I want. 

Helpful resources

Announcements
October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Badges

Incoming: New and Improved Badges

Exciting news: We've given our badges an overhaul and added brand news ones.

Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Users Online
Currently online: 446 members 4,312 guests
Please welcome our newest community members: