periodic reports for expense category groups

40 views
Skip to first unread message

Alan

unread,
Jan 23, 2012, 10:27:14 PM1/23/12
to ledge...@googlegroups.com
Hi,

Is it possible to get a periodic report (e.g., "monthly since last year") of all expenses, but have just one line per period for all expenses?

I understand how to get the report for just one expense account. And I see that if I query for "reg ^exp" I get all expense accounts, but reported individually. What I would like is a much shorter report: just one total expense amount per period.

Thanks!


Peter Keen

unread,
Jan 23, 2012, 10:50:39 PM1/23/12
to ledge...@googlegroups.com
You want to use a register report with the -M for monthly and -n for
'total' options. Like this:

ledger -Mn -b 2011/01/01 reg expenses


--Pete

John Wiegley

unread,
Jan 24, 2012, 8:18:43 AM1/24/12
to ledge...@googlegroups.com
>>>>> Peter Keen <peter.keen-qpbGg102UtMk+I/owr...@public.gmane.org> writes:

> You want to use a register report with the -M for monthly and -n for 'total'
> options. Like this:

> ledger -Mn -b 2011/01/01 reg expenses

There is a --group-by option, which can segregate reports based on the
differing values of the EXPR passed to --group-by. For example:

--group-by format_date('%m')

At least, that's exactly what it's intended to do. This feature still needs
more testing, so let me know if you run into problems.

John

Alan Bram

unread,
Jan 24, 2012, 12:05:30 PM1/24/12
to ledge...@googlegroups.com
Thanks, Pete! That's exactly what I was looking for.

Cheers,
- arb

Reply all
Reply to author
Forward
0 new messages