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

View all the Fabric Data Days sessions on demand. View schedule

Reply
GUJEN
Regular Visitor

Problem with cumulation total measure with missing events

 

Hi

 

I'm quite new to Power BI and I have run into problems regarding Measures of running / cumulative totals. I have checked this forum, tried a lot of suggestions but without any luck. The problem is as follow.

 

My data can for this be reduced to the following:

 

1) ID; Country; Grade_V2; StartDate;StartYear; EventDate;MonthEventDate (days between startdate and eventdate in month)

 

2) Index: A table with integers 1 to 60

 

Then I have the following measure:

 

CummulativeEvents = CALCULATE(sum(BLB[MonthEventtBin]),filter(all(BLB[MonthEventtBin]),BLB[MonthEventtBin]<=max(BLB[MonthEventtBin])))

 

That doesn't work. For some reason, as seen from the two pictures below, CummlativeEvents returns the product between the INDEX and the Count of MonthEventBin and calculated the running total. Why? What is the mistake I'm making?

 

 

Picture 1Picture 1TotalTotal

What I would like to see is the last value(s) in Cumulative event should be equal to the total. In the first case 24, then 31.

 

A couple of important information’s more:

 

There is not an event for every row - less than 10% of the rows have an event.

The data table 1 is not sort.

There is a relationship between Index and MonthEventBin.

 

 

 

1 ACCEPTED SOLUTION
v-ljerr-msft
Microsoft Employee
Microsoft Employee

@GUJEN

 

In order to calculate the cumulative totals for "MonthEventtBin" by "Index" in your scenario, you need to apply a filter to the "Index" column instead of the "MonthEventtBin" column. The formula below is for your reference.

CummulativeEvents =
CALCULATE (
    SUM ( BLB[MonthEventtBin] ),
    FILTER ( ALL ( BLB[Index] ), BLB[Index] <= MAX ( BLB[Index] ) )
)

Regards

View solution in original post

1 REPLY 1
v-ljerr-msft
Microsoft Employee
Microsoft Employee

@GUJEN

 

In order to calculate the cumulative totals for "MonthEventtBin" by "Index" in your scenario, you need to apply a filter to the "Index" column instead of the "MonthEventtBin" column. The formula below is for your reference.

CummulativeEvents =
CALCULATE (
    SUM ( BLB[MonthEventtBin] ),
    FILTER ( ALL ( BLB[Index] ), BLB[Index] <= MAX ( BLB[Index] ) )
)

Regards

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors