Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
giuliapiazza94
Helper IV
Helper IV

Total previous year used like current total

Hi guys,

I've 3 tables: A,B,C

 

A

giuliapiazza94_4-1701769143919.png

 

 

B

giuliapiazza94_1-1701769043762.png

 

C

giuliapiazza94_2-1701769069577.png

 

Result:

giuliapiazza94_5-1701769215263.png

 

 

 

the first colum (may 2023) is simple, the others are the problem.

I need to see the difference (1000€ - 370€ = 630€) in the row "liquid assets" of next month (june 2023)

The difference of june (= 430 €) --> liquid assets of july 2023

The difference of july (= 430€) --> liquid assets of august

....the same for the next months

 

Have you idea to do this?

 

Thank you 🙂 

 

 

1 ACCEPTED SOLUTION
123abc
Community Champion
Community Champion

Create a Calculated Column for Differences: Create a new calculated column in your data table to calculate the differences between consecutive months. You can use a formula like this:

 

Difference =
CALCULATE(
SUM(A[Amount]) - SUM(B[Amount]),
FILTER(
ALL('Date'[Month]),
'Date'[Month] = EARLIER('Date'[Month]) + 1
)
)

 

  1. Adjust this formula based on your actual column names and structure.

  2. Create a Running Total Measure: Now, create a measure for the running total. This measure should accumulate the differences for each month. Here's an example:

RunningTotal =
CALCULATE(
SUM('YourTable'[Difference]),
FILTER(
ALL('Date'[Month]),
'Date'[Month] <= MAX('Date'[Month])
)
)

 

  1. Again, adjust the table and column names accordingly.

  2. Visualize the Data: Finally, use a line chart or any suitable visualization to display the running total over time. Put the Date field on the x-axis and the RunningTotal measure on the y-axis.

These steps should help you create a Power BI report that shows the running total of differences in "liquid assets" over time. Adjust the formulas based on your actual data model and requirements.

View solution in original post

1 REPLY 1
123abc
Community Champion
Community Champion

Create a Calculated Column for Differences: Create a new calculated column in your data table to calculate the differences between consecutive months. You can use a formula like this:

 

Difference =
CALCULATE(
SUM(A[Amount]) - SUM(B[Amount]),
FILTER(
ALL('Date'[Month]),
'Date'[Month] = EARLIER('Date'[Month]) + 1
)
)

 

  1. Adjust this formula based on your actual column names and structure.

  2. Create a Running Total Measure: Now, create a measure for the running total. This measure should accumulate the differences for each month. Here's an example:

RunningTotal =
CALCULATE(
SUM('YourTable'[Difference]),
FILTER(
ALL('Date'[Month]),
'Date'[Month] <= MAX('Date'[Month])
)
)

 

  1. Again, adjust the table and column names accordingly.

  2. Visualize the Data: Finally, use a line chart or any suitable visualization to display the running total over time. Put the Date field on the x-axis and the RunningTotal measure on the y-axis.

These steps should help you create a Power BI report that shows the running total of differences in "liquid assets" over time. Adjust the formulas based on your actual data model and requirements.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.