Re: Annual Averages Report

2016-11-21 Thread Richard Lawrence
Hi Brian,

Brian Exelbierd  writes:

> 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?

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

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Annual Averages Report

2016-11-21 Thread Brian Exelbierd
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

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.