garyj
06-23-2024, 08:49 AM
Hello again..
I have a new accounting project I've been working on. I have a general journal (Table17) which lists all transactions. Then I use dynamic commands such as filter and choosecols to create account totals, such as Accounts Payable, Bank Cash, etc. It's pretty slick.
Below is the filter command that brings the data needed to the Banks/Cash record.
* BCSelectAcct is a data validation list which selects a particular bank account or petty cash etc.
* Column 2 of the GJ is the Date column - which becomes the sort column (1) for the filtered data.
* Column 4 is Item, Columns 7 and 8 are Debit and Credit respectively.
=IFERROR(CHOOSECOLS(SORT(FILTER(Table17,(Table17[Account]=BCSelectAcct)),,1),2,4,7,8),"None found")
In order to create a running sum column I made a hidden column, and then a running total column. The forumlas are shown below as follows and they spill because they follow the main filter data in A4, and then in E4.
=IFERROR(CHOOSECOLS(A4#,3)-CHOOSECOLS(A4#,4),"")
=SUBTOTAL(9,OFFSET(E4,0,0,SEQUENCE(ROWS(E4#)),1))
Now the problem. After about 100 or so entries, I realize that it needs to be sorted in the opposite order. Newest date at top.
The sort is easy enough, just by adding a negative sign to the 1 after the two consecutive commas in the first formula.
BUT I am lost on the running total. I tried versions of subtotal and also simplified it to =F5+E4#, which works in theory but creates a circular formula within the spill as soon as it goes to the second row. I can't find the problem on internet searches, but I can't believe it hasn't been asked before. Any advice?
Gary
I have a new accounting project I've been working on. I have a general journal (Table17) which lists all transactions. Then I use dynamic commands such as filter and choosecols to create account totals, such as Accounts Payable, Bank Cash, etc. It's pretty slick.
Below is the filter command that brings the data needed to the Banks/Cash record.
* BCSelectAcct is a data validation list which selects a particular bank account or petty cash etc.
* Column 2 of the GJ is the Date column - which becomes the sort column (1) for the filtered data.
* Column 4 is Item, Columns 7 and 8 are Debit and Credit respectively.
=IFERROR(CHOOSECOLS(SORT(FILTER(Table17,(Table17[Account]=BCSelectAcct)),,1),2,4,7,8),"None found")
In order to create a running sum column I made a hidden column, and then a running total column. The forumlas are shown below as follows and they spill because they follow the main filter data in A4, and then in E4.
=IFERROR(CHOOSECOLS(A4#,3)-CHOOSECOLS(A4#,4),"")
=SUBTOTAL(9,OFFSET(E4,0,0,SEQUENCE(ROWS(E4#)),1))
Now the problem. After about 100 or so entries, I realize that it needs to be sorted in the opposite order. Newest date at top.
The sort is easy enough, just by adding a negative sign to the 1 after the two consecutive commas in the first formula.
BUT I am lost on the running total. I tried versions of subtotal and also simplified it to =F5+E4#, which works in theory but creates a circular formula within the spill as soon as it goes to the second row. I can't find the problem on internet searches, but I can't believe it hasn't been asked before. Any advice?
Gary