Annual Averages Report

54 views
Skip to first unread message

Brian Exelbierd

unread,
Nov 21, 2016, 11:34:24 AM11/21/16
to ledge...@googlegroups.com
I am not seeing a report command line that will give me a list of all
accounts and their average amounts for a given period.

For example, this will give me one account:

ledger -f all.ledger --empty register Expense:Food -M --average -p "last
12 months"

but I don't see way to see every Expense account. I would expect
something like this to work:

ledger -f all.ledger --empty register Expense -M --average -p "last 12
months"

Any suggestions?

regards,

bex

Richard Lawrence

unread,
Nov 21, 2016, 11:38:51 PM11/21/16
to Brian Exelbierd, ledge...@googlegroups.com
Hi Brian,
I don't have a good way to do this with standard ledger. The ledger
--average option is a little opaque; at least, it does not behave the
way I would expect. Maybe there's a straightforward way to do this with
the balance report using a format string (e.g., divide the total for
each account by the number of periods)? I hope someone else can give a
better answer to this question!

But I wanted to say that one reason I have both ledger and hledger
installed is that hledger handles this kind of thing very nicely. In
hledger,

hledger -f all.ledger bal Expense -p monthly --average

does exactly what you want, I think. In general, I find the behavior of
--average in hledger a lot more intuitive.

HTH,
Richard
Reply all
Reply to author
Forward
0 new messages