Fava: Viewing Multiple Accounts

94 views
Skip to first unread message

Scott

unread,
Jan 23, 2023, 5:23:52 PM1/23/23
to Beancount
Hi,

 In fava, the 'account view' shows a journal of postings related to the account, changes, and balances as well as a graph over time. There are several situations where I'd like this same set of information but operating on multiple accounts.  This is easy to do if the accounts share a common ancestor, but sometimes the ancestor is too distant to make this meaningful.  For example, if my accounts were organized as Asset:<Bank>:<Acct Type>, I might want to get an aggregate view of all my Checking accounts (Assets:.*:Checking).  This information is mostly available a set of from a set of queries, but I don't think it's easy to see how the balance to this 'aggregate' account changes over time... alternatively, if you use the account view of "Asset" and then filter the accounts to ".*Checking", you almost get there, but if, for example, you have a transaction that posts to both an Assets:...:Saving and an Assets:...:Checking, then things don't seem to filter as desired; further, this won't work at all if the accounts don't share a common ancestor.

Any thoughts/pointers would be appreciated!


Ben Blount

unread,
Jan 23, 2023, 7:26:08 PM1/23/23
to bean...@googlegroups.com
A few thoughts:
- Reporting tools can handle these queries easily, but then you're not able to take advantage of Fava's nice built in visualization.
- It'd be pretty easy to write a plugin which inverts accounts like you've described. You could turn that plugin on when you want to do such visualizations, or you could have it always duplicate postings to those other accounts (but you'd need to be careful not to affect totals, so you'd probably want to emit both negative and positive versions of the transaction if you go for the "always on plugin" approach.

--
You received this message because you are subscribed to the Google Groups "Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beancount+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/0163da3e-82c1-428d-a952-85022370f37en%40googlegroups.com.

Red S

unread,
Jan 23, 2023, 8:07:38 PM1/23/23
to Beancount
On Monday, January 23, 2023 at 4:26:08 PM UTC-8 b...@bben.us wrote:
- It'd be pretty easy to write a plugin which inverts accounts like you've described. You could turn that plugin on when you want to do such visualizations, [....]

OP: taking this idea further: for the example you posted: you could use the rename_accounts plugin to temporarily rename
Asset:<Bank>:Checking:<Account> to:
 Assets:CheckingAccounts:<Account>

Then you'd be able to take advantage of Fava's built in visualizations. This approach also works regardless of whether they share a common ancestor. Of course, it requires turning the plugin on or off, and so is not as good as dynamic support for filtering in the UI would be.

S. Wallace

unread,
Jan 23, 2023, 9:27:54 PM1/23/23
to bean...@googlegroups.com
Thanks, these are good ideas, and much easier than writing a fava extension.  The rename account plugin looks pretty useful here.  Thanks for that! I noticed however that the version in PyPi is well behind the github repo, just fyi.

 Cheers!

--
You received this message because you are subscribed to a topic in the Google Groups "Beancount" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beancount/r_ifVOtlnE8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beancount+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/df2db931-c76e-440c-82f7-d336e381c985n%40googlegroups.com.

Red S

unread,
Jan 24, 2023, 6:52:50 AM1/24/23
to Beancount
Ah yes, just haven't had the time to figure out test coverage, and make releases. The bleeding edge should be decently stable fro the main uses cases though. At least I use all the plugins from the latest commit actively.
Reply all
Reply to author
Forward
0 new messages