How to combine multiple data sets in Microsoft Excel with Power Query

Microsoft Power Query is a useful tool for working with data inside Microsoft Excel. It comes with lots of features that help manage simple but powerful datasets.

Power Query is most useful when working with multiple data sets. It acts as a bridge between data sets and Microsoft Excel.

To demonstrate that, the article will guide you to perform a common task where Power Query shines: Combine two different data sets into one.

Use Power Query to combine multiple data sets in Microsoft Excel

  1. What is Microsoft Power Query?
  2. Data set
  3. Load the data into the Power Query Editor
  4. Use the Power Query Editor
    1. Add a second data source
    2. Join the data sheet
    3. Load data into the worksheet

What is Microsoft Power Query?

Microsoft Power Query is a tool included in Microsoft Excel for Windows. It is only included in versions of Excel 2016 or newer, so check these versions to start using Power Query. New users should make sure they understand the basics of Excel before starting to use Power Query.

What Power Query allows you to do is load data from several different sources, edit that data, and then import the data into an Excel spreadsheet. Learn more about why you should start using Microsoft Power Query.

One of the types of sources that you can get data from is other Excel worksheets. To get the data illustrated for Power Query in this article, the example will use two separate Excel spreadsheets, containing the same data sets, then combine them into one.

Data set

Choose 2 Excel workbooks, respectively 'Cars.xlsx' and 'Trucks.xlsx' in the example. The content of these spreadsheets is very simple. Each worksheet contains a table describing certain media classified by the columns: 'Make', 'Model', 'Color' and 'Year' .

How to combine multiple data sets in Microsoft Excel with Power Query Picture 1

How to combine multiple data sets in Microsoft Excel with Power Query Picture 2

The example is also creating an empty workbook titled 'Vehicles.xlsx' to do its job.

For simplicity, the article is using two data sets with the same header information. The goal here is to create a new board with both car and truck information.

These workbooks have been saved to the computer. Now let's work on Power Query!

Load the data into the Power Query Editor

To get started, all you need to do is open the workbook containing the created data. In this case, the workbook is 'Vehicles.xlsx'.

Power Query is very easy to use. You do not need to open a workbook containing data to extract what you need. In 'Vehicles.xlsx', navigate to the Data tab containing options for the workbook.

You will see the 'Get Data' option in the toolbars. This option is an entry to Power Query and will allow you to select your data source.

You want to work with an Excel workbook, so select the 'From File' option , followed by 'From Workbook' .

How to combine multiple data sets in Microsoft Excel with Power Query Picture 3

The editor will open the file explorer and you can navigate to the workbook anywhere on the PC. First, you will select the file 'Cars.xlsx'.

When you have finished selecting your file, the Power Query Navigator menu will load to show you a preview of the selected worksheet. Note the 'Cars.xlsx' file , as well as the worksheet displayed in the Navigator. Click on the sheet and the worksheet will load on the same menu as it appears in the worksheet! Click 'Transform Data' to open the data in the editor.

How to combine multiple data sets in Microsoft Excel with Power Query Picture 4

Use the Power Query Editor

Power Query Editor has a lot of options, don't worry about those right now, as you will only get acquainted with the basics of this article. At first glance, the data has been uploaded properly! It looks like an Excel table. The data is organized in rows and columns, with headings named at the top.

How to combine multiple data sets in Microsoft Excel with Power Query Picture 5

To your right is a menu called 'Query Settings' that contains an 'Applied Steps' window. The steps here are changes made to the table. Note this section for later use.

On the far left, clicking on the 'Queries' icon will expand the menu and show the name of the table you are working on. Power Query can take multiple tables at a time and will display them all in this toolbar.

To join the two tables, both tables need to be uploaded to Power Query. You already have one, so upload the other one.

Add a second data source

Inside the editor, in the top right corner, is the 'New Source' button . This button allows you to select an additional data source and add it to the Power Query Editor.

How to combine multiple data sets in Microsoft Excel with Power Query Picture 6

Select 'File' and then 'Excel' to open the file explorer. Navigate to 'Trucks.xlsx' to select the file to import.

Like the first query, the Navigator will appear, allowing you to select your table from the spreadsheet. Select the spreadsheet, then click OK. Now you will see both car and truck boards in the Queries toolbar . Clicking on one of the two tables will display the data in that spreadsheet.

How to combine multiple data sets in Microsoft Excel with Power Query Picture 7

Join the data sheet

Once all the steps have been prepared, combining the data tables is actually quite simple. Click on the 'Cars' panel , and on the toolbar, select 'Append Queries' in the 'Combine' section.

The Append window will appear and mention the table you want to merge into the selected table. Remember that you are on the 'Cars' board and want to associate the 'Trucks' board with it. Click the 'Trucks' table inside the 'Table to append' to combine and select OK.

How to combine multiple data sets in Microsoft Excel with Power Query Picture 8

Here is the result:

How to combine multiple data sets in Microsoft Excel with Power Query Picture 9

Note that all car and truck data will be placed in the same table. The datasets have been combined! Also, note that Power Query has created a new 'step' in your list, called 'Appended Query'.

Load data into the worksheet

The last thing to do is to take the data stored in the Power Query Editor and load it into your spreadsheet.

In the top left corner, click 'Close & Load' to place the newly created table into Vehicles in table format. When clicked, the following will happen:

  1. The editor will save the query and exit steps.
  2. The workbook will appear with the data loaded as an Excel table.
  3. Excel will also open the Workbook Queries menu on the right side of the worksheet.

How to combine multiple data sets in Microsoft Excel with Power Query Picture 10

You are ready to work with brand new spreadsheets without opening a spreadsheet!

You have now learned how to append data with Power Query. You have a powerful new tool to simplify data. Now that the data has been loaded into Excel for use, you can work with it like any table. You can create charts from Excel tables or insert pictures in bulk into Excel cells.

Hope you are succesful.

4 ★ | 1 Vote

May be interested

  • How to Merge in ExcelHow to Merge in Excel
    microsoft office excel offers a variety of features for customizing tables and charts that contain important information. the program also provides efficient ways to combine and summarize data from multiple files and worksheets. common methods for merging in excel include merging by location, by category, using formulas, or the program's pivot table feature. learn how to consolidate in excel so that your information shows up in the master sheet and can be referenced whenever you need to report.
  • How to combine 2 or more cells in Excel without losing dataHow to combine 2 or more cells in Excel without losing data
    how to combine 2 or more cells in excel without losing data. when merging cells containing data into 1 cell, excel retains the data in the first cell only, data in the remaining cells are deleted. so to retain all data in the cells you need to merge, you cannot use the feature
  • How to Automate Reports in ExcelHow to Automate Reports in Excel
    this wikihow teaches you how to automate the reporting of data in microsoft excel. for external data, this wikihow will teach you how to query and create reports from any external data source (mysql, postgres, oracle, etc) from within your...
  • 5 nightmares for Excel and how to fix it5 nightmares for Excel and how to fix it
    we will show you how to handle multiple workbooks effectively, speed up heavy files, track changes from multiple users, find the required features in a multitude of ribbons and import data one by one. easy way.
  • How to Automatically Report on ExcelHow to Automatically Report on Excel
    today's tipsmake will guide you how to automatically report data on microsoft excel. this article also talks about how to query and create reports from external sources (mysql, postgres, oracle, etc.) right on your spreadsheet using the excel plug-in to link your spreadsheet to the source. that data. as for data stored on excel spreadsheets, we will use macro commands to create and export reports into many different file types with just one keystroke. luckily, excel has this feature built in, so you won't need to create your own algorithm.
  • How to use the Sets feature to include tabs on a Windows 10 windowHow to use the Sets feature to include tabs on a Windows 10 window
    sets feature in windows 10 redstone 5 helps you group application tabs into one window for quick management and access.
  • MS Access 2003 - Lesson 22: Using Query WizardsMS Access 2003 - Lesson 22: Using Query Wizards
    access includes 4 different types of wizard queries, and only one where you can see all of those query types. select query from the insert menu, access displays the new query dialog box as shown in figure 1.
  • How to combine 2 columns Full name in Excel does not lose contentHow to combine 2 columns Full name in Excel does not lose content
    in excel, to be able to merge content in 2 columns into a single column without losing content, we need to use calculation functions.
  • How to use CONSOLIDATE to statistic, combine data in ExcelHow to use CONSOLIDATE to statistic, combine data in Excel
    consolidate is one of excel's useful data statistics tools. consolidate allows you to quickly perform sum, average, maximum value, minimum value ... how to use consolidate to statistic and pool data in excel
  • Transfer form data from Word to ExcelTransfer form data from Word to Excel
    microsoft excel is a powerful spreadsheet database management application. if you are using a word application to collect user data, it is necessary to transfer all of this data to an excel spreadsheet for management. besides, data conversion is a job with multiple records (record) and field (field) data.