balance
3 TopicsRunning balance (difference) by groups
I'm trying to calculate running balance for quantity on hand after usage. My sample table looks like this. Any idea on what I need to do to get the expected value? Index 1 Index 2 Component Start Date On hand Qty required Running Balance (expected value) 1 1 A 1/1/2024 10 2 8 2 2 A 1/2/2024 10 2 6 3 1 B 1/1/2024 5 1 4 4 2 B 1/2/2024 5 1 3 5 1 C 1/1/2024 15 1 14 6 2 C 1/2/2024 15 1 13 7 1 D 1/1/2024 10 2 8 8 1 E 1/1/2024 5 1 4 9 2 E 1/2/2024 5 1 3 10 3 E 1/3/2024 5 1 2Solved546Views0likes2CommentsWeekly closingBlance by AccountNo with missing WeekEndDate
Hi everyone, I need help in generating a matrix/bar chart with weekly closing balance. I have two datasets : Position Date Date has been created based on "AccountingDate" of Position table. I added a column "WeekEndDate" which is the end date of each week. I tried to get the last BalanceValue for each "AccountNo" at the end of the week. The problem is that sometimes, AccountNo has no record in a week. Thus value in matrix is wrong. Here is an example : If my WeekEndDate is 14/01/22, final week balance should be : 95808,99 + (-1646984,4056) + 91288,25 = -1459887,17 But in my matrix Balance of AccountNo 512411 was not took in the measure. Hence It returns : (-1646984,4056) + 91288,25 = -1555696,16 I currently use this method I found from another forum and tuned it with my dataset : lastnonblankdate = LASTNONBLANK ( 'Positions et mouvements bancaires réels'[Accounting Date], CALCULATE ( SUM ( 'Positions et mouvements bancaires réels'[BalanceDaily] ) ) ) lastnonblankvaue by category: = VAR _lastnonblankdatebycategory = ADDCOLUMNS ( SUMMARIZE ( 'Positions et mouvements bancaires réels', 'Mapping comptes'[Accounting No] ), "@lastnonblankdate", [lastnonblankdate] ) RETURN IF ( HASONEVALUE ('Date'[Week End Date]), CALCULATE ( SUM ( 'Positions et mouvements bancaires réels'[BalanceDaily] ), TREATAS ( _lastnonblankdatebycategory, 'Mapping comptes'[Accounting No], 'Date'[Date] ) ) ) Do somoes ever faced this issue and came up with an alternative or solution. Thank you!Solved767Views0likes3CommentsCummulative sum over all periods keeping filters
Hi! I've been trying to get a cummulative sum to work. I have a date field, "posting date" and an amount field, "amount". The table, "general ledger" can be filtered by some dimensions. I want to create a measure, "balance" that is the sum of "amount" for all entries up until the selected "posting date". For example if we have a table with month of posting date and "balance", the balance field should show the sum of all entires up until and including each month. I can get this to work, but not if I also want the user to be able to filter the visual or page on "posting date". For example to only show the last three months. I then want the table to show only three months and their balances, but still include all history when calculating the balances. How can this be done? Thanks, MartinSolved946Views0likes3Comments