Power BI Running Total: Easy Methods to Calculate

Published on Jan 21,2025 11 Views
Investigating the point where knowledge and passion converge, Come along with me... Investigating the point where knowledge and passion converge, Come along with me on an exploration journey where words paint pictures and creativity is fueled...

Power BI Running Total: Easy Methods to Calculate

edureka.co

Imagine having a record of daily expenditures and wishing to investigate how they would eventually pile up over time—the places this concept of running totals will take you. With running totals, Power BI gives you a mighty insight into the cumulative value you build while traversing through your data. It allows you to analyze the trend of sales and investigate inventory and financial metrics by showing a rise over time. Dynamic and insightful reports may be made and could show patterns and growth over time. A game-changer in data storytelling because just about any user can see development and trends at once.

Why is Running Total used in Power BI?

Creating cumulative analysis on trends over time with Power BI’s running totals feature enables insights beyond static data. The ability to track metrics over time, like sales, revenue, or inventory, will help users better understand how metrics perform in patterns and toward objectives.

This is one of the best examples of identifying periods of peak activity or concern or establishing seasonality in the analysis by extracting significance from data over a long period at a frequency. To compare actual and target performance thus far in a given year, for instance, running totals are frequently set up against specific expectations, offering a great deal more insight into operations.

Running totals tell stories through changing visuals that show growth and trends quite explicitly. Now, it is easier for decision-makers to grasp data at a glance, making it more likely that they will make more well-informed decisions and act accordingly based on the latest information on the cumulative performance view.

You now understand why Power BI uses running total. Next, we’ll examine what Power BI’s Running Total is

What is Running Total in Power BI?

In Power BI, a running total is the cumulative sum of the values calculated over a specific order, be it time or other categories. It shows how the values accumulate as one navigates through the data, which is used to track advancement, examine patterns, and visualize growth. You can generate dynamic and engaging running totals for reporting using DAX formulas.

Next, we’ll look at how to use Power BI to compute a basic running total.

How to calculate a simple running total in Power BI?

The following are examples of running totals in Power BI.

Similar results can be obtained in Power BI, but not as easily as in Excel. Use the same data shown above in Power BI.

The steps for using running totals in Power BI are as follows.

1. First, navigate to Table View The dataset labeled “sample dataset” is shown below. 

2. There are three methods by which we can determine running totals for this table. We’ll get there first by using “New measure.” Once the table has been right-clicked, select “New measure.”

3. The new measure will then open in the formula bar, and you can rename it to suit your preferences. I’ll call it Data Measure. 

Data Measure =

 

4. Now we’ll use the CALCULATE function first.

Data Measure =

CALCULATE(

5. We must use the CALCULATE function to express ourselves in the form of “Summation of Revenue.” Select the “Revenue” column after launching the SUM function.

Data Measure =

CALCULATE(

  SUM('sample dataset'[Revenue]))

6. To determine which criteria should be matched for calculation, we must apply the filter after applying the type of calculation. Now launch the FILTER function.

Data Measure =

CALCULATE(

    SUM('sample dataset'[Revenue]),

    FILTER(

7. Any filter applied to the “Date” column must be released before applying FILTER. To remove the filter from the “Date” column, use the ALL function.

Data Measure =

CALCULATE(

    SUM('sample dataset'[Revenue]),

    FILTER(

        ALL(

8. Select the “Table” or “ColumnName” that needs to be removed in this function.8. In this function, select the “Table” or “ColumnName” that requires the filter to be removed; therefore, select the “Date” column.

Data Measure =

CALCULATE(

    SUM('sample dataset'[Revenue]),

    FILTER(

        ALL('sample dataset'),

        'sample dataset'[Date]

9. After deleting the filter, we need to input new filter criteria in “Filter Expression.” Select the “Date” column once more for this.

Data Measure =

CALCULATE(

    SUM('sample dataset'[Revenue]),

    FILTER(

        ALL('sample dataset'),

        'sample dataset'[Date])

10. After choosing the “Date” column, we must choose the type of filter to use. The last date in the “Date” column must be determined for this, so open the MAX function and enter less than (<) as the logical operator.

Data Measure =

CALCULATE(

    SUM('sample dataset'[Revenue]),

    FILTER(

        ALL('sample dataset'),

        'sample dataset'[Date] <= MAX(

11. The MAX function will find the last date in the “Date” column, so supply the “Date” column.

Data Measure =

CALCULATE(

    SUM('sample dataset'[Revenue]),

    FILTER(

        ALL('sample dataset'),

        'sample dataset'[Date] <= MAX('sample dataset'[Date]

12. We’re finished. To obtain the result, close three brackets and hit the “Enter” key.

Data Measure =

CALCULATE(

    SUM('sample dataset'[Revenue]),

    FILTER(

        ALL('sample dataset'),

        'sample dataset'[Date] <= MAX('sample dataset'[Date])

    )

)

13. Visually insert the table, starting with the “Date” and “Revenue” columns.

14. It is the overall summary. A newly created measure can be added to the table Data measure to obtain the “Running Total” column.

I hope that you now understand exactly how to run total measures in Power BI.

If you require this dataset, please leave a comment below.

Next, we’ll see How can I figure out Power BI’s year-to-date total?

How to calculate a YTD total in Power BI?

To determine how to compute a year-to-date total in Power BI, we can also generate a running total using an alternative measurement method.

1. Give this metric the name “Data measure YTD”

Data Measure YTD = 

2. Open the function CALCULATE.

Data Measure YTD = CALCULATE (

3. The “Revenue” column must be summarised, just like in the prior method. To sum up, select the “Revenue” column in the SUM function.

Data Measure YTD = CALCULATE (SUM( 'Sample dataset ' [Revenue])

4. The DATESYTD function will be used this time for the filter criteria.

Data Measure YTD = CALCULATE (SUM( 'Sample dataset ' [Revenue]), (DATESYTD(

5. For this function, select the “Date” column.

Data Measure YTD = CALCULATE (SUM( 'Sample dataset ' [Revenue]), (DATESYTD( 'Sample dataset ' [Date]

6. To finish the formula, close two brackets and hit the “Enter” key.

Data Measure YTD = CALCULATE (SUM( 'Sample dataset ' [Revenue]), (DATESYTD( 'Sample dataset ' [Date])))

7. See the outcome by adding this new measure to our current table visual.

This is how Power BI determines a year-to-date total.

Conclusion

Running totals in Power BI helps analyze cumulative metrics over time, giving precise insights into trends and performance. They are usually created using DAX functions, such as SUM, CALCULATE, or TOTALYTD, along with proper filtering. A complete and well-related date table is critical to ensuring accurate calculations. Thanks to running totals, users will better track progress and ensure an informed future based on past over-time trends.

FAQ

1. How to calculate a running total in Power BI?

Use Dax programming to measure the cumulative total. In most cases, using CALCULATE followed by SUM and filter DATESYTD or ALL SELECTED is common.

2. What is the formula for running total?

Example DAX formula:

Running Total =
CALCULATE(
SUM(Sales[Amount]),
FILTER(
ALL('Date'),
'Date'[Date] <= MAX('Date'[Date])
)
)

3. How can I find the total amounts in Power BI?

Totals may be calculated by using aggregation functions such as SUM, AVERAGE, MIN, MAX, or COUNT in measures or columns. Dynamic calculations use CALCULATE together with filter conditions.

4. What are the differences between running totals and rolling totals?

Running total: It is the current cumulative total from the start of the data. Rolling total: The sum for a certain window, updated at the moment, resetting every time the window moves, e.g., rolling forward in time every 7 days or months.

Knowledge of Power BI’s Running Totals is crucial for examining cumulative trends and producing informative reports. Power BI-focused training programs can help you improve your abilities, maximize report performance, and progress your business intelligence career. We advise you to enroll in Edureka’s Microsoft Power BI Certification Training: PwC Academy. Dual certification in business intelligence is available through PwC’s Power BI certification course offered by Edureka. The course provides practical experience in real-time projects and is taught by a live instructor. It provides simulated real-world scenarios and helps you get ready for the official PL-300 exam.

Do you need more information or have any questions? Please feel free to comment below, and we will respond as soon as we can!

Upcoming Batches For Power BI Certification Training Course: PwC Academy
Course NameDateDetails
Power BI Certification Training Course: PwC Academy

Class Starts on 25th January,2025

25th January

SAT&SUN (Weekend Batch)
View Details
Power BI Certification Training Course: PwC Academy

Class Starts on 10th February,2025

10th February

MON-FRI (Weekday Batch)
View Details
Power BI Certification Training Course: PwC Academy

Class Starts on 15th February,2025

15th February

SAT&SUN (Weekend Batch)
View Details
BROWSE COURSES