Forum Discussion
Casperserven1
3 years agoHelper I
Accumulating using previous
I am trying to do tthe following and struggling - I am sure this is easy but just can't see it. New Hires Retirees Total Workforce 3 5 20 6 3 23 8 1 30 9 8 31 4 6 ...
- 3 years ago
Now I got it. Please try
Total Workforce =
VAR StartingWF = 22
VAR TableBefore =
FILTER ( 'Table', 'Table'[Date] < EARLIER ( 'Table'[Date] ) )
VAR Change =
SUMX ( TableBefore, 'Table'[New Hires] - 'Table'[Retirees] )
RETURN
StartingWF + Change
Casperserven1
3 years agoHelper I
Thankyou so much , unfortunately it still isn't right. We only want the starting figure of 22 in the first row. after that is thould be adding and subtracting from the previous row.
tamerj1
3 years agoCommunity Champion
Casperserven1
Please clarify further. Perhaps with a screenshot?
- Casperserven13 years agoHelper I
yeah sure
- tamerj13 years agoCommunity Champion
Now I got it. Please try
Total Workforce =
VAR StartingWF = 22
VAR TableBefore =
FILTER ( 'Table', 'Table'[Date] < EARLIER ( 'Table'[Date] ) )
VAR Change =
SUMX ( TableBefore, 'Table'[New Hires] - 'Table'[Retirees] )
RETURN
StartingWF + Change