Forum Discussion
Accumulating using previous
- 3 years ago
Hello Casperserven1 ,
We can achieve this using multiple ways but I can recall and create using one way among them.
You may need to create four columns for this.
First two columns are index columns from '0' and '1' which can be created in Power Query Editor.
For next two columns the DAX calculations looks as below:
Reference = IF('Data Table'[Index] = 0, 'Data Table'[Total Workforce],LOOKUPVALUE('Data Table'[Total Workforce],'Data Table'[Index New],'Data Table'[Index]))Result = IF('Data Table'[Index]=0,'Data Table'[Reference],'Data Table'[Reference]+'Data Table'[New Hires]-'Data Table'[Retirees])Output looks like this:
If this post helps, then please consider accepting it as the solution to help other members find it more quickly. Thank You!!
Hello Casperserven1 ,
We can achieve this using multiple ways but I can recall and create using one way among them.
You may need to create four columns for this.
First two columns are index columns from '0' and '1' which can be created in Power Query Editor.
For next two columns the DAX calculations looks as below:
Reference = IF('Data Table'[Index] = 0, 'Data Table'[Total Workforce],LOOKUPVALUE('Data Table'[Total Workforce],'Data Table'[Index New],'Data Table'[Index]))Result = IF('Data Table'[Index]=0,'Data Table'[Reference],'Data Table'[Reference]+'Data Table'[New Hires]-'Data Table'[Retirees])
Output looks like this:
If this post helps, then please consider accepting it as the solution to help other members find it more quickly. Thank You!!