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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
julsr
Resolver III
Resolver III

Measure to sum all values of previous months is not working, not accumulating

Hello everyone.

 

I have one field that calculates the value month by month, and I'm using it on a Line and Clustered Chart. With this code, I want to see a Cumulative line that increases each month (i.e., January = 200, February = January + 100-->300, March = January + February + 1432-->1732, etc.).

I'm using the following code, but the values are not accumulating month by month.

 

TotalCumulative =
CALCULATE(
SUM(totals[AMOUNTS]),

REMOVEFILTERS(dataTable1[Date],dataTable1[month],dataTable1[year],dataTable1[month_name]),

DATESMTD(DatesTable[Date]),

TREATAS(
VALUES(dataTable1[TYPEACC]),
totals[service_type]
)
)

What measure could I use? 

Note: The 3 tables used in the code are joined and are needed.

1 ACCEPTED SOLUTION
rajendraongole1
Super User
Super User

Hi @julsr - can you try the below measure

 

TotalCumulative =
CALCULATE(
SUM(totals[AMOUNTS]),
FILTER(
ALL(DatesTable[Date]),
DatesTable[Date] <= MAX(DatesTable[Date])
),
TREATAS(
VALUES(dataTable1[TYPEACC]),
totals[service_type]
)
)

 

Hope it works, if not please share  sample data for reference and further analyses 

 

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

1 REPLY 1
rajendraongole1
Super User
Super User

Hi @julsr - can you try the below measure

 

TotalCumulative =
CALCULATE(
SUM(totals[AMOUNTS]),
FILTER(
ALL(DatesTable[Date]),
DatesTable[Date] <= MAX(DatesTable[Date])
),
TREATAS(
VALUES(dataTable1[TYPEACC]),
totals[service_type]
)
)

 

Hope it works, if not please share  sample data for reference and further analyses 

 

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





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