On Mon, Feb 22, 2021 at 3:36 PM Dan Sladden <[email protected]> wrote: > > 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 > ledger reg -f /whereever/you/store/ledger'name'.dat --limit 'account =~Expenses:Utilities:Broadband -b 2014.04.06 -e 2015.04.05
I modified what I sent earlier to the dating you're looking for. What I do not know is if that phrase 'Expenses:Utilities:Broadband' is the actual 'account name - - - - I use numbers. You may have to experiment with the =~ part of the command. If you run the years inline without closing each one out (I don't see the need but ymmv) the search really doesn't care what you beginning and ending dates are - - - - just enter them. Now if you're entering your records so that one set ends on dec 31st and the next starts on jan 1st - - - - - well then things won't be so easy. HTH -- --- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ledger-cli/CAPpdf5-Xeh-O_As%3D23k6tAecjiUC%2B3Z1iTvBaiTBVpo%3Df8eRYQ%40mail.gmail.com.
