Power BI Running Total

Running Total in Power BI

Power BI seems to be a little difficult for MS Excel users because, in excel, we work cells, so by using cell references, we can work easily, but when it comes to Power BI, we no longer work with cells but with entire columns and rows. This is where beginners in Power BI face huge challenges. One of the requirements of users in Power BI how do we get the running total or cumulative total of values. In this article, we will show you how to write DAX formulas to get running total in Power BI.

What is Running Total in Power BI?

Running total is the summation of values of each period before arriving at the overall period totals. For example, look at the below data in excel worksheet.

Data Table

This is the daily sales numbers, so the running total is arriving each period number with previous period numbers. For the above data, we can apply the running total like below.

Apply running total

First running total is the total of first two days i.e. 341 + 769 = 1110, next it will add three days numbers 341 + 769 + 777 = 1887. This, in the end, we get to know the pattern of each day.

Examples of Running Total in Power BI

Below are examples of the running total in Power BI. You can download the workbook to use the same file as we used in this example.

Similar stuff can be arrived in Power BI as well but not as easy as in excel. Use the same data as shown above in Power BI as well.

You can download this Power BI Running Total Excel Template here – Power BI Running Total Excel Template

The steps to use running total in Power BI are as follows.

  1. Select Table from Field Section.

    Running Total in Power BI - Step 1

  2. For this table, we can arrive running totals in three ways. First, we will arrive through “New Measure,” right-click on the table and choose “New Measure.”


    Running Total in Power BI - Step 2

  3. Name the measure as “RT Measure.” (RT= Running Total).


    Running Total in Power BI - Step 3

  4. Open the CALCULATE function first.

    Running Total in Power BI - Step 4

  5. The kind of Expression that we need to do with the CALCULATE function is “Summation of Sales Value,” so open the SUM functionOpen The SUM FunctionThe SUM function in excel adds the numerical values in a range of cells. It is categorized under the math and trigonometry function entered by typing “=SUM” followed by the values to be summed. The values can be numbers, cell references or ranges.read more and choose the “Sales” column.


    Running Total in Power BI - Step 5

  6. After applying the kind of calculation to be done next, we need to apply the filter to decide the criteria to be matched for calculation. Open FILTER function now.


    Running Total in Power BI - Step 6

  7. Before we apply FILTER first, we need to release any kind of filter applied to the “Date” column, so open the ALL function to remove the filter from the “Date” column.


    Running Total in Power BI - Step 7

  8. In this function, choose the Table or Column Name for which we need to remove the filter for, so choose the “Date” column.



    Running Total in Power BI - Step 8

  9. Once the filter is removed, then we need to apply fresh filter criteria in Filter Expression, so for this again, choose the date column.


    Running Total in Power BI - Step 9

  10. Once the “Date” column has been selected, we need to apply the kind of filter to be applied. For this, we need to decide the last date in the “Date” column, so enter the logical operatorLogical OperatorIn Excel, logical operators, also known as comparison operators, are used to compare two or more values. Depending on whether the condition matching is true or false, these operators return the output.read more as less than (<) and open the MAX functionMAX FunctionThe MAX Formula in Excel is used to calculate the maximum value from a set of data/array. It counts numbers but ignores empty cells, text, the logical values TRUE and FALSE, and text values.read more.


    Running Total in Power BI - Step 10

  11. MAX function will find the last date in the column of “date,” so supply the date column.


    Running Total in Power BI - Step 11

  12. Ok, we are done. Close three brackets and hit the enter key to get the result.

    Running Total in Power BI - Step 12

  13. Now insert the table visually and add “Date” and “Sales” columns first.



    Running Total in Power BI - Step 13

  14. This is the overall summary, now add a newly created measure to the table to get the “Running Total” column.


    Running Total in Power BI - Step 14
    There you go, we have a running total measure.
    We can also create a running total by using another measurement technique as well, but this measure will give different sorts of results only.

  15. Name this measure as “RT Measure 1”.



    Running Total in Power BI - Step 15

  16. Open the CALCULATE function.

    Running Total in Power BI - Step 16

  17. As we did in the previous method, we need to do a summation of the sales column, so open the SUM function and choose the “Sales” column to sum.


    Running Total in Power BI - Step 17

  18. This time for filter criteria, we will use the DATESYTD function.

    Running Total in Power BI - Step 18

  19. Choose the “Date” column for this function.

    Running Total in Power BI - Step 19

  20. Close two brackets and hit the enter key to complete the formula.

    Running Total in Power BI - Step 20

  21. Ok, now add this new measure to our existing table visual and see the result.

    Running Total in Power BI - Step 21

We have got two different sets of running totals. The first running total ends at the end of the year on 31st December, and the second running total started freshly from the new year date from 01st Jan.

Note: Power BI dashboard file can also be downloaded from the link below, and the final output can be viewed.

You can download this Power BI Running Total here – Power BI Running Total

Things to Remember

This has been a guide to Power BI Running Total. Here we learn how to write DAX formulas to get running total in Power BI along with examples using the DATESYTD function. You may learn more about Power BI from the following articles –

  • 35+ Courses
  • 120+ Hours
  • Full Lifetime Access
  • Certificate of Completion
LEARN MORE >>