Expanding table columns is a common Power Query action. It even has its own icon. But there is a problem lurking here. Clicking the expand data button hardcodes the column names into the M code. So, if new columns are added to the source at a later date, they don’t show up. So, in this Read More
Category: Power Query
How to filter by a list in Power Query (4 methods)
Filtering is a common task in Power Query. Usually, we filter by a single value, or maybe a small number of known values. These filter values are hardcoded into the underlying M code. Therefore, to change the filter, we have to edit the query. But what if we don’t know which items we want to Read More
How to remove spaces in Power Query
In a previous post, we looked at various methods to remove additional spaces in Excel. One of the methods involved creating a custom function in Power Query. As this is a more advanced method, I wanted to go a bit deeper and describe the method to remove spaces in Power Query. Excel TRIM vs. Power Read More
Get data from OneDrive Personal files with Power Query
I shared how to get data from OneDrive or SharePoint into Power Query in a previous post. Many people noted that the method shown in that post works with OneDrive for Business but doesn’t work with OneDrive Personal. So, in this post, I will demonstrate the technique needed to connect Power Query to files in Read More
Get data from OneDrive or SharePoint with Power Query
In Power Query, when we connect to a local file, it’s reasonably obvious how we do that; it’s built directly into the UI. We just need to navigate to the location… Bam. Done! However, what if we want Power Query to get data from OneDrive or SharePoint? How do we do that? It’s not obvious. Read More
How to list all possible combinations from multiple lists (2 ways)
Imagine a scenario where you have two or more lists in Excel and from that, you want to list all possible combinations in one table. This is known as a cartesian join. The question might come in a simple form, such as: “How can we get a complete list of all General Ledger and Cost Read More
How to calculate Power Query Percent of total or category
In this post, we look at how to calculate the percentage of a total in Power Query. But we will also take this one step further, to consider how to calculate the percent of a category. In standard Excel, these calculations are simple because we are so used to the formulas to achieve this. For many, Power Read More
Power Query date format (How to + 5 tricky scenarios)
One thing that continually causes problems for all data professionals is dates. Over time, Microsoft has given us a plethora of tools and Excel functions for handling dates, yet they still catch us out. Power Query is a tool for manipulating and cleaning data, and it has a lot of features for managing dates. The Power Query Read More
How to remove spaces in Excel (7 simple ways)
The space character for an Excel user can be a real problem. When exporting data from various IT systems, that export will often include extra spaces around values. Finding a way to remove spaces in Excel is a crucial skill for every user. We often can’t see the space characters, but Excel sees them. They Read More
How to get data into Power Query – 5 common data sources
OK, let’s get started with Power Query. The first thing we need to do is get data into Power Query. In this series, it is our first real look at Power Query; we are also going to use this as an opportunity to explore the user interface. This post is structured into two main parts: Read More