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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
TechR21
Helper V
Helper V

measure which calculates values based on value of previous month

Hi,

 

Im trying to create a measure that calculates the cumulative value. This is calculated with the formula:

cumulative = cumulative value previous month + total costs

 

Only May contains a cumulative value, which is 1,058,333.40. With this value (from a column) I have to calculate the cumulative value of the other months.

 

TechR21_0-1692859151102.png

 

Im trying a few things but I cant seem to get the correct values, only for June, because for July he takes the empty value of Cumu column for June + total costs.

 

the measure i use:

Cumulative = Calculate(MIN('table1'[Cumu])  + [total costs]  , DATEADD('Query1'[Date], -1, MONTH))

 

Anyone an idea how to get this working?

2 REPLIES 2
JoeBarry
Solution Sage
Solution Sage

Hi @TechR21 

 

@Greg_Deckler explains in the video to get a running total https://www.youtube.com/watch?v=meh3OkgFYfc&list=PLoibEIc7heYNZbnY4CTCtg2tjEcMh8WbZ&index=3 

 

You can also try

 

 

Costs Running Total = 
    VAR maxdate = MAX(Cost_Table[Date])
    RETURN
    CALCULATE(
        SUM(Cost_Table[Cost Amount]),
        Cost_Table[Date] <= maxdate,
        ALL(Cost_Table[Date])
    )

 

 

Thanks

Joe

 

If this post helps, then please Accept it as the solution 

 

 

 

but your measure doesnt include the table1[cumu] value so it wont give the correct values.

 

the May value (1,058,333.40) is the starting point. Together with the costs of that month , that is the cumulative value

 

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.