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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Elisa_E
Helper I
Helper I

Running total calculation

Hello,

 

I need to create a cumulative total for year to year adding new projects that have started, but also subtracting projects that have ended based on two columns. I have read the article on cumulative total and have a seperate date table, but am not sure if there is a measure I can create that also subtracts projects that have already ended.  Any help would be greatly appreciated.


Thank you.

 

Untitled.png

1 ACCEPTED SOLUTION
MarkS
Resolver IV
Resolver IV

Hi @Elisa_E,

Instead of using running total calculations could you use a measure like this to get the number of active projects in a year.

 

ActiveCount = 
var temp=MAX(Table1[Start]) 
return 
CALCULATE(COUNT(Table1[ProjectID]),Table1[Start]<=temp, Table1[End]>=temp)

You might want to change the Table1[End]>=temp to just >temp depending on your business logic.

 

That producese the following based on the example data

 

sample 02-06-2018.PNG

 

 

View solution in original post

2 REPLIES 2
MarkS
Resolver IV
Resolver IV

Hi @Elisa_E,

Instead of using running total calculations could you use a measure like this to get the number of active projects in a year.

 

ActiveCount = 
var temp=MAX(Table1[Start]) 
return 
CALCULATE(COUNT(Table1[ProjectID]),Table1[Start]<=temp, Table1[End]>=temp)

You might want to change the Table1[End]>=temp to just >temp depending on your business logic.

 

That producese the following based on the example data

 

sample 02-06-2018.PNG

 

 

This works perfectly! Many thanks!!

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

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

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.