How to get Running Total in Power BI
Loading
How to get Running Total in Power BI
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Eliana BlakeRank #1,595 · 993 reputationPosted Mar 2, 2025, 1:38 AM EST
I'd be more than happy to shed light on Running Total in Power BI for you. In Power BI, a Running Total is essentially a cumulative sum or total of a specific column's values. It provides a running calculation that continuously updates with each row of data.
To calculate a Running Total in Power BI, you can use DAX (Data Analysis Expressions) functions. One common approach is to use the DAX function called CALCULATE in combination with the FILTER function or other functions like SUMX or TOTALYTD, depending on your specific requirements.
Here's a simple example of how you can create a Running Total in Power BI using DAX:
Running Total = CALCULATE( SUM([Column]), FILTER( ALLSELECTED('Table'), 'Table'[Date] <= MAX('Table'[Date]) ) )In this example, 'Column' represents the column for which you want to calculate the Running Total, and 'Table' is the name of your table in Power BI.
By using the above DAX formula within a measure in Power BI, you can obtain a Running Total that dynamically adjusts based on the selected or filtered data.
Running Totals are particularly useful for tracking cumulative values over time, such as sales totals, inventory levels, or account balances. They provide valuable insights into the overall trend of your data and can be a powerful tool for analysis and visualization in Power BI.
If you need further clarification or have any specific scenarios in mind where you want to apply Running Totals in Power BI, feel free to ask!
Tuhin PaulRank #7 · 71.9K reputationPosted Mar 2, 2025, 2:52 PM EST
In Power BI , a Running Total is a common calculation used to show the cumulative sum of values up to a certain point in time or based on another dimension. This can be particularly useful for visualizing trends over time, such as cumulative sales, cumulative costs, or cumulative counts.
Tuhin PaulRank #7 · 71.9K reputationPosted Mar 2, 2025, 2:54 PM EST
Ensure your data includes a date column and a value column that you want to calculate the running total for. For example:
Create a Date Table (Optional)Date: The date dimension.SalesAmount: The value you want to accumulate.If you don’t already have a dedicated date table, it's recommended to create one. A date table helps manage date-related calculations more effectively.
Dates = CALENDAR( DATE(YEAR(MIN('YourTable'[Date])), 1, 1), DATE(YEAR(MAX('YourTable'[Date])), 12, 31) )You can create a running total measure using DAX. Here are two common approaches:
A. Using
CALCULATEandFILTERThis method calculates the running total by filtering the dataset up to the current date.
Running Total = CALCULATE( SUM('YourTable'[SalesAmount]), FILTER( ALL('YourTable'), 'YourTable'[Date] <= MAX('YourTable'[Date]) ) )B. Using
SUMXandDATESYTD(for Year-to-Date Running Total)If you want a year-to-date running total, you can use
SUMXcombined withDATESYTD.YTD Running Total = SUMX( DATESYTD('Dates'[Date]), CALCULATE(SUM('YourTable'[SalesAmount])) )Tuhin PaulRank #7 · 71.9K reputationPosted Mar 2, 2025, 2:54 PM EST
Visualize the Running Total
Once you’ve created the running total measure, you can visualize it in a chart or table:
Add a Line Chart or Area Chart :
Datefield to the Axis well.Running Totalmeasure to the Values well.Format the Chart :
Tuhin PaulRank #7 · 71.9K reputationPosted Mar 2, 2025, 2:55 PM EST
Suppose you have a table named
Saleswith columnsDateandAmount. To create a running total of sales:Create the Running Total Measure :
Visualize the Running Total :
Dateon the X-axis andRunning Total Saleson the Y-axis.Amira BedhiafiRank #601 · 4K reputationPosted Mar 2, 2025, 6:03 PM EST
Maybe if you provide us your input data we can help you :)