How to Calculate Running Total in Power BI

In this article, you will learn how to calculate the calculated column for running total in Power BI using the DAX function.

Suppose that you have dates in first column and sales values in the second column, your requirement is to create a calculated column which shows the running total or cumulative total.

Running Total in Power BI

Steps to Follow

  1. Open the table where you need to add a running total column (like in above image).
  2. Click on New Column tool. New Column tool is available in the Home tab or in Table Tools tab.
  3. In the Formula bar, after “Column=” write below given DAX function.
  4. Press Enter Key in Keyboard. Now a new column with running total will appear.

DAX Function

CALCULATE(SUM(sales_jan023[Sales Value]),FILTER(ALL(sales_jan023),sales_jan023[Days]<=EARLIER(sales_jan023[Days])))

Note: In above DAX function, sales_jan023 is the table name. Days and Sales Value is the available column header.

Rename The Column

To rename the column, in the Column Tools tab, put desired name in the name box and press Enter key. For example, “Running Total”.

Alternatively, you can rename column while writing DAX function. Instead of “Column =” put “Running Total =”.

PBI Project File

To practice this DAX function, download the power BI project file from below.

Note: After Downloading the file, unzip the zipped folder for edit and save access.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top