

Get data from a single file such as an Excel workbook, Text or CSV file, XML and JSON files.Excel provides many common data connections that are accessible from the Data tab and can be found from the Get Data command. Importing your data with Power Query is simple. In 2016 it was renamed to Get & Transform and appears in the Data tab without the need to install any add-in. Power Query is available as an add-in to download and install for Excel 20 and will appear as a new tab in the ribbon labelled Power Query. All you need to do is build the query once and reuse it, saving an hour of work each and every month! Where is Power Query? With Power Query, this can all be automated down to a click of the refresh button on a monthly basis.

Maybe it only takes an hour a month to do, but it’s pretty mindless work that’s not enjoyable and takes away from time you can actually spend analyzing the data and producing meaningful insight. Now you can summarize the data by category. You create another column using the LEFT function to get the first 4 digits of the product code, then use a VLOOKUP on this to get the product category. You also need to link the product ID to the product category but only the first 4 digits of the product code relate to the product category. Then you need to summarize the sales by salesperson and calculate the commission to pay out. The system only outputs the sales person’s ID, so you need to add a new column to the data and use a VLOOKUP to get the salesperson associated with each ID. You then use the text to column feature to split out the data into new columns.

Imagine you get a sales report in a text file from your system on a monthly basis that looks like this.Įvery month you need to go to the folder where the file is uploaded and open the file and copy the contents into Excel. Get the data used in this post to follow along. If you want to edit or write your own M code, you certainly can, but you definitely don’t need to. The power query editor records all your transformations step by step and converts them into the M code for you, similar to how the Macro recorder with VBA. The best part about it, is you don’t need to learn or use any code to do any of it. It’s an incredibly short learning curve when compared to other Excel tools like formulas or VBA. The user interface is intuitive and well laid out so it’s really easy to pick up. Power Query can import and clean millions of rows into the data model for analysis after.

It allows you to set up a query once and then reuse it with a simple refresh. Power Query is a business intelligence tool available in Excel that allows you to import data from many different sources and then clean, transform and reshape your data as needed.
