# Power BI Running Total Article byJeevan A Y ## 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.

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.

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. 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.” 3. Name the measure as “RT Measure.” (RT= Running Total). 4. Open the CALCULATE function first. 5. The kind of Expression that we need to do with the CALCULATE function is “Summation of Sales Value,” so and choose the “Sales” column. 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. 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. 8. In this function, choose the Table or Column Name for which we need to remove the filter for, so choose the “Date” column. 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. 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 as less than (<) and open the . 11. MAX function will find the last date in the column of “date,” so supply the date column. 12. Ok, we are done. Close three brackets and hit the enter key to get the result. 13. Now insert the table visually and add “Date” and “Sales” columns first. 14. This is the overall summary, now add a newly created measure to the table to get the “Running Total” column. 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”. 16. Open the CALCULATE function. 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. 18. This time for filter criteria, we will use the DATESYTD function. 19. Choose the “Date” column for this function. 20. Close two brackets and hit the enter key to complete the formula. 21. Ok, now add this new measure to our existing table visual and see the result. 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

• Always create a running total of new measures only to get perfect results.
• If you DATESYTD, it will give from 01st Jan to 31st Dec only; any dates after that will be started as a new running total from next year.

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