Your problem sounds quite like one I had some time ago[1]. The solution to my problem was to use the `--now <date>` option. In your test example that would be (I think, I haven't tested):
ledger budget --f test.ledger -p 2013 --now 2013-12-31 ^exp Hope that helps. -Michael [1] https://groups.google.com/d/topic/ledger-cli/3unblMMyK9Y/discussion On Mon, Jan 7, 2013 at 11:08 PM, Lifepillar <[email protected]> wrote: > I have some trouble trying to get and compare budget reports in a way > that makes sense to me, and would like to know whether I am alone in my > foolishness. > > Consider the following contrived example: > > <<<<---- CUT HERE test.dat---->>>> > > ~ Monthly > Expenses:Mobile $100.00 > Assets > > 2013/01/05 T1 > Expenses:Mobile $200.00 > Assets:Checking > > >>>>---- CUT HERE test.dat---<<<< > > For > > ledger budget --f test.ledger -l 'd>=[2013-1-1] and d<=[2013-12-31]' ^exp > > the result is > > $200.00 $100.00 $100.00 200% Expenses:Mobile > > Since I'm asking for a report over a year, I would expect the budgeted > amount for mobile to be $1,200, not $100—that is, the budgeted amount > should, in my opinion, be computed over the requested period and not > over the period spanned by the transactions. The latter behavior would > allow me, for example, to easily calculate how much I have allocated for > the current year without waiting till the end of the year (or adding > “dummy transactions” with dates 2013/1/1 and 2013/12/31 respectively). > Does it make sense? Is there a way in Ledger to obtain what I want? > > Note that the problem is not that some dates are (at the time of this > writing) in the future: the same report would be obtained by changing > 2013 with 2012 everywhere. > > Life > >
