Forum Discussion
Help: Building a deposit/withdrawal Calculation
- 9 years ago
Based on your description, it seems that you need to get the runngint total to previous day for starting level, and runngint total to current day for end level. You can use the DAX below to create your measure.
Starting Level = CALCULATE(SUM(Table1[Deposit])-SUM(Table1[Withdrawal])+100,FILTER(ALL(Table1[Date]),Table1[Date]<MAX(Table1[Date])))
End Level = CALCULATE(SUM(Table1[Deposit])-SUM(Table1[Withdrawal])+100,FILTER(ALL(Table1[Date]),Table1[Date]<=MAX(Table1[Date])))Reference
http://www.daxpatterns.com/cumulative-total/Regards,
Charlie Liao
Based on your description, it seems that you need to get the runngint total to previous day for starting level, and runngint total to current day for end level. You can use the DAX below to create your measure.
Starting Level = CALCULATE(SUM(Table1[Deposit])-SUM(Table1[Withdrawal])+100,FILTER(ALL(Table1[Date]),Table1[Date]<MAX(Table1[Date])))
End Level = CALCULATE(SUM(Table1[Deposit])-SUM(Table1[Withdrawal])+100,FILTER(ALL(Table1[Date]),Table1[Date]<=MAX(Table1[Date])))
Reference
http://www.daxpatterns.com/cumulative-total/
Regards,
Charlie Liao