cancel
Showing results for
Did you mean:
Frequent Visitor

## Weird Error with Running Total Measure

Hey All I have data in the form below

 ID Amount Month 1 1234 1 1 423 3 1 125 5 2 4352435 1 2 324 6 2 23452 32 3 243 1

However when I try to run my running total I get this odd graph

So it correctly calculates my the running total until it reaches the end of my data and then plummets to 0 when it should just maintain a straight line infinitely.

My code for the measure is:

Amount Incurred running total in Month =
CALCULATE(
SUM('FACT_sales'[Amount]),
FILTER(
ALLSELECTED('FACT_sales'[Month]),
FACT_sales[Month]<= MAX(FACT_sales[Month]
)
))

Any ideas why my running total is failing after some point and how to solve it?
Note: that I ran the exact same table through an excel pivottable and got nice graph below

1 ACCEPTED SOLUTION
Super User

@anonymouAsd , Create a new month table

month = generateseries(1,20,1)

join it month in your table and create a measure like

CALCULATE(
SUM('FACT_sales'[Amount]),
FILTER(
ALLSELECTED('month'),
month[Month]<= MAX(month[Month]
)
))

2 REPLIES 2
Community Support

Hi, @anonymouAsd

You can try the following methods.

``````Amount Incurred running total in Month =
CALCULATE (
SUM ( 'Table'[Amount] ),
FILTER ( ALL ( 'Table' ), [Month] <= MAX ( 'Table'[Month] ) )
)``````

Is this the result you expect?

Best Regards,

Community Support Team _Charlotte

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

Super User

@anonymouAsd , Create a new month table

month = generateseries(1,20,1)

join it month in your table and create a measure like

CALCULATE(
SUM('FACT_sales'[Amount]),
FILTER(
ALLSELECTED('month'),
month[Month]<= MAX(month[Month]
)
))

Announcements

#### 2023 Release Wave 1 Plans

Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.

#### Global Power BI Training

Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!

#### 2022 Monthly Feature Releases

We had a great 2022 with a ton of feature releases to help you drive a data culture.

Top Solution Authors
Top Kudoed Authors