Apologies - I'm not being very clear. I'm trying to total the entries for the whole financial year that ends on (in my case) 5 April.
This is the output of for example *ledger broadband --yearly* '2019-01-01' - '2019-12-31' Expenses:Utilities:Broadband £ 350.14 £ 350.14 '2020-01-01' - '2020-12-31' Expenses:Utilities:Broadband £ 463.85 £ 813.99 '2021-01-01' - '2021-12-31' Expenses:Utilities:Broadband £ 40.34 £ 854.33 But what I want is this: '2019-04-06' - '2020-04-05' Expenses:Utilities:Broadband £ 465.58 £ 465.58 '2020-04-06' - '2021-04-05' Expenses:Utilities:Broadband £ 388.75 £ 854.33 John, --group-by 'format_date(date, "%Y")' looks helpful as I could write a function that maps the date onto the financial year (although leap years would be a pain) but it won't aggregate the entries in the same way as --yearly I don't think. Dan On Mon, 22 Feb 2021 at 21:08, John Wiegley <jwieg...@gmail.com> wrote: > >>>>> "DS" == Dan Sladden <d...@sladden.com> writes: > > DS> But none of this does what I want - a single list of tallied > DS> transactions for each financial year from one ledger command. Yes, I > DS> can do it by executing multiple commands with different -b and -e > DS> arguments, but that's IMHO not very elegant. > > Have you tried --group-by 'format_date(date, "%Y")'? > > John > -- --- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/ledger-cli/CAJcMy37A2MwzRpX0YhL4vB1CWNk8VWpO4%2B6%3DqUP03PSkyXipcw%40mail.gmail.com.