Power BI: Create cumulative totals easily
In Power BI you create cumulative totals with a DAX measure that combines CALCULATE and FILTER. Your basic formula adds up all values up to and including the current date in the timeline. Link the measure to a date table for correct time intelligence. Add the measure to a line chart or table to see at a glance how values accumulate over time. This is valuable for revenue, budget, and performance analyses.
In Power BI it is often valuable to show cumulative totals to make trends and performance over time visible. In this article you'll learn how to add a cumulative totals column to your dataset in a straightforward way, making your data analyses even more powerful.
In Power BI it is often valuable to show cumulative totals to make trends and performance over time visible. In this article you’ll learn how to add a cumulative totals column to your dataset in a straightforward way, making your data analyses even more powerful. This is relevant for data and BI teams who want to enrich their reports with clear time-bound insights.
What you need
-
A dataset with a date column on which you want to base the cumulative totals
-
A numeric column with the values you want to add up (for example revenue or counts)
-
Power BI Desktop or access to the online environment to add DAX formulas
Step 1: Create a base measure for the sum of your values
Before you can calculate cumulative totals, first create a simple measure that calculates the sum of the relevant values. This is the foundation on which the cumulative calculation is built.
In Power BI, go to the ‘Modeling’ tab and choose ‘New measure’. Use the following DAX formula, replacing ValueColumn with the name of your numeric column:
TotalValue = SUM('YourTable'[ValueColumn])
This measure adds up all values in the selected column.
Step 2: Create the cumulative total measure with DAX
Now create a new measure that calculates the cumulative totals based on the date column. You do this with the CALCULATE and FILTER functions to include all dates up to and including the current date.
Add a new measure with this DAX formula, replacing DateColumn with your date column:
CumulativeTotal =
CALCULATE(
[TotalValue],
FILTER(
ALL('YourTable'[DateColumn]),
'YourTable'[DateColumn] <= MAX('YourTable'[DateColumn])
)
)
This measure adds up all values from the beginning to the current row date, creating a cumulative total.
Step 3: Add the cumulative totals to your report
Add a table or chart to your report and place the date column and the new CumulativeTotal measure in it. This immediately shows you the running totals over time.
This makes it easy to analyse trends and compare performance across periods. You can also extend this approach with filters or segmentations for more detailed insights.
Tips & common mistakes
-
Always use a date column with unique dates to guarantee correct cumulative totals.
-
Check that your base measure is correct before creating the cumulative measure.
-
Avoid using filtered contexts that can disturb the cumulative calculation, such as slicers without a date filter.
-
Test your measure in different visuals to make sure the cumulative totals are correct.
Example / mini use case
Suppose you have a sales dataset with a date column and a revenue column. With the cumulative total measure you can easily see in a line chart how revenue develops over the course of the year. This helps identify growth periods and evaluate sales targets.
Conclusion
With these simple steps you add valuable cumulative totals to your Power BI reports, strengthening your analyses and reporting. For creating and editing your reports, work directly in Power BI Desktop or the online environment.
Our tip: Combine the cumulative total measure with a regular sum in the same line chart. This way you see both the daily values and the running total in one visual. This immediately shows whether you are on track relative to your cumulative target, without needing two separate visuals.
Frequently asked questions
What tips and common mistakes are there?
- Always use a date column with unique dates to guarantee correct cumulative totals. - Check that your base measure is correct before creating the cumulative measure. - Avoid using filtered contexts that can disturb the cumulative calculation, such as slicers without a date filter. - Test your measure in different visuals to make sure the cumulative totals are correct.
How do I create cumulative totals in Power BI with DAX?
First create a base measure with SUM for the values you want to add up. Then create a second measure with CALCULATE and FILTER: use ALL on the date column and add a filter condition that includes all dates less than or equal to the current date. The formula looks like this: CALCULATE([TotalValue], FILTER(ALL('Table'[Date]), 'Table'[Date] <= MAX('Table'[Date]))). Link the measure to a date table for best results.
Why are my cumulative totals incorrect when I use a slicer?
Slicers can limit the filter context so that FILTER can no longer iterate over all dates. Use ALL or ALLSELECTED in your CALCULATE function to maintain the correct context. With ALLSELECTED you respect the other report filters but remove the restriction on the date column itself. Always test the measure in a table without additional filters to verify the base calculation is correct before adding slicers.