Skip to main content

Posts

Showing posts with the label efficiency

How to calculate a running total in Excel

When presented with a table of data that requires analysis, one common requirement is to calculate a running total or what some might call a cumulative sum of individual values. One application might be a table containing the amount of money spent across a number of transactions and there is a need to provide a running total to show the total spend across the data set. There are a couple of different methods to achieve this but the easiest way is to use the function =sum($B$2:B2) where column B contains the values that you wish to add in a running total. This gif (below) is the above function being added to a table containing values. I've used the keyboard shortcut F4 to set the cell reference to absolute so that when it fills down, the second part of the cell range increments with each row.

How to combine multiple files using Power Query / M within Power BI

In this example, I'm going to combine the files contained within a folder using PowerQuery/M in PowerBI. Below is the folder and the 4 files contained within the folder. Each of these files has an identical structure of 2 columns, Column A contains the 'type' (A, B, C or D) and column B contains a 'Value' (between 1 and 100). In order to combine this data we need to do the following: Open PowerBI, click on 'get data' then click on 'More' This will open the 'Get Data' window which contains a list of all the connectors available in PowerBI Select 'Folder' and then click 'Connect  This will then present the 'Folder' window, where the folder reference needs to be added. In this instance, the folder name is 'C:\Example\FilesToCombine' Click OK, this will then display a window listing the files in the folder and provide some further options The options at the bottom of the window provide a few different methods to procee...