How can I create a cumulative line chart in Power BI?

Power BI is a powerful data visualization tool that allows users to create interactive and dynamic charts to represent their data. One type of chart that can be created in Power BI is a cumulative line chart. This type of chart is useful for tracking trends and changes over time, as it displays the cumulative total of a measure over a specific period. To create a cumulative line chart in Power BI, the user can select the desired measure and time period, and then use the “Show Cumulative Total” option in the chart settings. This will create a line chart that displays the cumulative total of the selected measure over time, providing a clear and concise visual representation of the data. This feature in Power BI enables users to easily analyze and interpret data trends, making it a valuable tool for data analysis and decision making.

Create a Cumulative Line Chart in Power BI


Often you may want to create a line chart in Power BI that shows the cumulative values of some variable over time.

The following step-by-step example shows how to create the following cumulative line chart in Power BI:

Power BI cumulative line chart

Let’s jump in!

Example: How to Create a Cumulative Line Chart in Power BI

Suppose we have the following table in Power BI named my_data that contains information about sales made on various dates by some company:

Suppose we would like to create a line chart that displays the cumulative sales over time.

Before we can create the line chart, we must add a new column that contains the cumulative sum of the values in the Sales column.

To do so, click the Table tools tab along the top ribbon, then click the New column icon:

Then type the following formula into the formula bar:

Cumulative Sales = 
CALCULATE (
    SUM ( 'my_data'[Sales] ),
    ALL ( 'my_data' ),
    'my_data'[Date] <= EARLIER ( 'my_data'[Date] )
)

This will create a new column named Cumulative Sales that contains the cumulative sum of the values in the Sales column:

To create a line chart that displays the values in the Cumulative Sales column, click the Report View icon on the left hand side of the screen:

An empty line chart will be inserted:

Next, drag the Date variable under the X-axis label, then drag the Cumulative Sales variable under the Y-axis label:

This will produce the following line chart:

Power BI cumulative line chart

The x-axis displays the date and the y-axis displays the cumulative sales.

Additional Resources

The following tutorials explain how to perform other common tasks in Power BI:

x