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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Casperserven1
Helper I
Helper I

Accumulative measure - any ideas

Hi - I am trying to produce a canaluclated measure to do the following:

This is my data table:

TurnNewHiresRetireesNHmRE
0000
124-2
2615
3422
4651
5312

 

And this is the result I am trying to achieve using a measure

TurnNewHiresRetireesNHmREWorkforce
000022
124-220
261525
342227
465128
531230

 

My starting workforce is 22 and then at every turn it then takes the previous turn workforce total and add NHmRE to give the running total.
e.g Turn 1 Workforce = Turn 0 Workforce (22) + Turn 1 NHmRE (-2)  which gives 20

      Turn 2 Workforce = Turn 1 Workforce (20) + Turn 2 NHmRE (5)  which gives 25

 

I have posted this previously but the solution given was using calculated columns. I need a measure .... any ideas ?

1 ACCEPTED SOLUTION

Thank you so much @johnt75 Had to tweak the solution because the actual data looks like this:
CourseDateTurnTableNew HiresTotal WorkforceRetirees

01 April 20161Red2213
01 April 20162Red2212
01 April 20163Red2212
01 April 20164Red2203
01 April 20165Red2193
01 April 20161Lilac2213
01 April 20162Lilac2203
01 April 20163Lilac1192
01 April 20164Lilac1173
01 April 20165Lilac2163
01 April 20161Green2213
01 April 20162Green2203
01 April 20163Green2202
01 April 20164Green2193
01 April 20165Green2192
01 April 20161Blue2213
01 April 20162Blue2203
01 April 20163Blue2202
01 April 20164Blue2193
01 April 20165Blue2183
01 April 20161Black2213
01 April 20162Black2203
01 April 20163Black0182
01 April 20164Black1181
01 April 20165Black2164

 

Casperserven1_0-1687426908341.png

 

View solution in original post

2 REPLIES 2
johnt75
Super User
Super User

You could try

Workforce =
VAR StartingNumber = 22
VAR CurrentTurn =
    SELECTEDVALUE ( 'Table'[Turn] )
VAR CumulativeChanges =
    CALCULATE (
        SUM ( 'Table'[NHmRE] ),
        REMOVEFILTERS ( 'Table' ),
        'Table'[Turn] <= CurrentTurn
    )
VAR Result = StartingNumber + CumulativeChanges
RETURN
    Result

Thank you so much @johnt75 Had to tweak the solution because the actual data looks like this:
CourseDateTurnTableNew HiresTotal WorkforceRetirees

01 April 20161Red2213
01 April 20162Red2212
01 April 20163Red2212
01 April 20164Red2203
01 April 20165Red2193
01 April 20161Lilac2213
01 April 20162Lilac2203
01 April 20163Lilac1192
01 April 20164Lilac1173
01 April 20165Lilac2163
01 April 20161Green2213
01 April 20162Green2203
01 April 20163Green2202
01 April 20164Green2193
01 April 20165Green2192
01 April 20161Blue2213
01 April 20162Blue2203
01 April 20163Blue2202
01 April 20164Blue2193
01 April 20165Blue2183
01 April 20161Black2213
01 April 20162Black2203
01 April 20163Black0182
01 April 20164Black1181
01 April 20165Black2164

 

Casperserven1_0-1687426908341.png

 

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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