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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
crsjunior
Advocate I
Advocate I

Conditional Cumulative

Greetings, 

 

I need help with a dax cumulative formula that stops acumulating based on a date. 

 

I have some activities, and need them to cumulate through tha date they been created ti'll the day they where finished. On the current weeknum only be shown the activities that were created or not finished from the past weeks.

 

This image is some tests I'm working on, but can't figure a way to stop cumulating only the finished activities.

The green bar is the sum of created activies hours, and the blue is the cumulative

crsjunior_0-1651092333773.png

 

2 REPLIES 2
v-kkf-msft
Community Support
Community Support

Hi @crsjunior ,

 

What do you mean by stopping cumulating only the finished activities? Doesn't the green bar already exclude finished activities?

 

Best Regards,
Winniz

amitchandak
Super User
Super User

@crsjunior , you can top based on table date

 

example

 

Cumm Sales =

var _max = maxx(allselected(Sales), Sales[Date])

return

CALCULATE(SUM(Sales[Sales Amount]),filter(allselected('Date'),'Date'[date] <=max('Date'[date]) && ,'Date'[date]  <=_max ))

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
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.