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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
anonymouAsd
Frequent Visitor

Weird Error with Running Total Measure

Hey All I have data in the form below

IDAmountMonth
112341
14233
11255
243524351
23246
22345232
3243

1

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

anonymouAsd_0-1669872845387.png

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 

anonymouAsd_1-1669873007638.png

 

1 ACCEPTED SOLUTION
amitchandak
Super User
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]
)
))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
v-zhangti
Community Support
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] ) )
)

vzhangti_0-1669966560419.png

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.

amitchandak
Super User
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]
)
))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

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 community update carousel

Fabric Community Update - June 2025

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