Skip to main content

Posts

Showing posts with the label tricks

How to modify data once you've added it using Enter Data in Power BI

So you've added some data to your data model using the 'enter data' button and you've realised you need to add another row, column or possibly remove some data. It might not be immediately apparent how to do this and I suspect some would delete the table and re-enter the correct information. Theres no need to do this as there is an easy way to modify the original data entered. Here's how to do it. 1. Right click on the table you wish to enter and select 'edit query' 2. In the PowerQuery Editor, double click on the first step labelled 'Source' in the Applied Steps section 3. Now you'll see the 'Create Table' window where you can edit the data you originally entered and then click 'ok' when you're done. Thats it!

How to move a measure from one table to another

If you've created a measure in Power BI and accidentally put it on the wrong table, no need to panic! moving a measure from one table is very quick and easy once you know how to do it. To move a measure from one table to another, all you need to do are the following steps 1. Switch to 'Model' view (or where you view the relationships in your model) by clicking on the bottom icon of the 3 on the left hand side of the window 2. Make sure the table containing the measure is expanded in the 'fields' list 3. Locate the measure and then drag it from its location to the table in which you would like it to be stored Thats it!

How to create a Measures table in Power BI

If you've learnt Power BI organically and developed your skills using 'real world' applications you've probably learnt a couple of things the hard way. One thing I realised on my journey with PowerBI was that its very easy to create many measures and then end up with a model that’s difficult to manage and maintain. Initially, I would create measures and place them in the table that felt like the best place to store them, this worked for a while but inevitably didn’t quite work. I also tried putting a 'special' character at the start of the name, in my case a # symbol, to easily differentiate a measure from a column, this also didn’t quite work. After doing some research, I found the best solution to this issue was to create a Measures table and put all of my measures in this table. In this post, I'll show you how I created the measures table.   There are a couple of methods to create a measures table, the most obvious one is to create a 'table' u

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 create a Date Table using DAX

In order to utilise the time-based functionality of PowerBI, you'll need to add a Date Table to the data model. This can be done through a few different methods. The easiest way to do this is to use DAX to generate the table and associated columns. One way of doing this is described below. To download the file created in this example, click here. Click 'Modelling' in the menu bar Click 'New Table' in the menu When the formula bar appears, enter DateTable = CALENDAR (date(2010, 1, 1) , today())  as shown below This will now create a table with one row per date, from the 1st of January, 2010 to the current date. To see this table, click the 'Data' icon on the left hand side of the screen You will then see the following table, with a list of dates as described previously In order to develop your date table to provide additional columns, such as day number, week number, day name, month, etc, one method is to use the GENERATE  function. In order to add an additio