The result will be a table that looks something like this: In Power BI connect to your Excel file as normal, then in the Navigator pane right-click on the name of the Excel workbook and select Edit rather than selecting any of the individual worksheets:
Step 1: Get a table with all the worksheets listed And yes, that is basically what needs to happen, but the devil’s in the detail. However in this particular case it doesn’t solve the problem, because we get this:Īha, you may say, we have to transform the data before we can combine it and so we need to create a function and call it for every worksheet – the technique I’ve already blogged about here.
If each sheet has the same columns, this means you can just connect to the Excel workbook and get a table containing the contents (Miguel Escobar has a great post describing how to do this here) and then click the Expand/Aggregate button: Now most of the blog posts that describe this problem, such as Ken Puls’s post here, assume each worksheet has a table with the same column names on it. The required output for Power BI should be a table that looks like this: On each worksheet is some sales data for the three months in each quarter for example the Q1 worksheet looks like this: Let’s say you have an Excel workbook with four worksheets: Q1, Q2, Q3 and Q4. I was asked to explain how to do this recently while teaching a Power BI class, so in this blog post I’m going to walk through a worked example and point out a few issues that might trip up even experienced Power BI users.įirst of all, the source data.
Indeed a lot of people have blogged about how to solve this problem, but none of the solutions I’ve found on the internet work in more complex scenarios when the data on each sheet needs some kind of transformation before it can be combined. It’s very common that you need to combine data from multiple worksheets in the same Excel workbook when you’re using Power BI or Power Query/Get&Transform in Excel.