Cashflow query

59 views
Skip to first unread message

Jason Chu

unread,
Aug 8, 2017, 12:37:54 PM8/8/17
to Beancount
I'm pretty sure it's possible to write a cashflow bean query something like this:

select root(account, 4), convert(sum(position), 'USD') FROM has_account('Assets') OPEN ON 2017-01-01 WHERE not account ~ 'Assets' group by 1 order by 1;

This shows me all the transactions that included a Assets account, but doesn't output any balances of those Asset accounts (they're a bit nonsensical).

It would be nice to be able to substitute different accounts in the from and the where, if I wanted to dig into cash flow from a particular account, but it's annoying to keep the two strings in sync.  Are the any thoughts on adding support for parameters to either bean-query or fava?  Then I could

run "Cashflow" "Assets:US:Bank"

to see where all my money went from that particular bank account.

Martin Blais

unread,
Aug 8, 2017, 8:45:48 PM8/8/17
to Beancount

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to bean...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/CAFFHUgta_G09gtN7Nb5H%2BxA_0kU1-X4YyVDt8A1JXhOuV8EZ4w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages