Forum Discussion
Accumulated Balance
- Anonymous5 years ago
Because the date is not unique, you cannot use the Date column for accrual in the FILTER function. You must add an index column in Power Query.
Before you add an index column, you must ensure that the date column is sorted from small to large and that the Balance column is also sorted from small to large, so that the result is as desired.
Tips: I cannot enter the PBIX file that you provided to add index columns in Power Query, so I exported the data and recreated a PBIX file.
So the measure is
Saldo_acum = CALCULATE(SUM('Sheet1'[Saldo]),FILTER(ALLEXCEPT('Sheet1',Sheet1[Account],Sheet1[BPLId]),[Index]<=MAX('Sheet1'[Index])))You can check more details from here.
Best regards
Stephen Tao
If this post helps,then consider Accepting it as the solution to help other members find it faster.
Something like this?
Hey.
What if there is not only one booking per day per account? Does it consider the order in the table or do I have to insert an index and add that to the formular? If the last is correct, could you please tell me how you would solve it?!