cancel
Showing results for
Did you mean:  Helper III

## Running total by month based on selected year

Hi Team,

I need your help in solving the below problem.

Need to find out the running total based on selected year and show by month,here is sample data. Thanks,
Raj

1 ACCEPTED SOLUTION  Community Support

Hi,

``````Running total =

CALCULATE(

SUMX(

SUMMARIZE( Sheet1, [Month], "_test", [Test] ),

[Test]

),

FILTER(

ALLSELECTED(Sheet1),

Sheet1[Month] <= MAX([Month])

)

)`````` Best regards,
Lionel Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

8 REPLIES 8  Super User

Try the following formula:

``````Cumulative_Actual =
CALCULATE (
SUM ( Sheet1[Values] ),
FILTER( ALL (Sheet1 ),
Sheet1[Month] <= MAX( Sheet1[Month] ))
)``````  Helper III

Just to give you more information, the test field is a calculated measure of average of 4 year.  Community Support

Hi,

``````Running total =

CALCULATE(

SUMX(

SUMMARIZE( Sheet1, [Month], "_test", [Test] ),

[Test]

),

FILTER(

ALLSELECTED(Sheet1),

Sheet1[Month] <= MAX([Month])

)

)`````` Best regards,
Lionel Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.  Super User

It is a bit confusing now.

Do you require cumulative total across 12 months on a selected year; based on the initial description?

or Average across selected years ... and cumulative sum on this average, across months?

If you could send a sample table of how you want the output table to look like that would be great  Helper III

this is what i am seeing in the output after implementing.   Super User

Did you try to use this pattern:

https://www.daxpatterns.com/cumulative-total/

_______________
If I helped, please accept the solution and give kudos! 😀  Helper III

Here i want to show cummulative for each year by month.  Helper III

I tried it but it is not giving the righ result.   