On Tue, 16 Aug 2016 09:19:48 +0200
Marcin Borkowski wrote:
> Hi all,
>
> I sent this to the list a few weeks ago, but apparently it didn't get
> thrugh, so I'm resending.
>
>
> I tried to compute my average monthly expenses like shown in the manual,
> however, I started to get strange figures. Here's a kind of "minimal
> working example" (or rather, a "minimal non-working example").
>
> Ledger file "average.ledger":
>
> --8<---cut here---start->8---
> ; Testing average monthly expenses computing
>
> 2016/01/01 * Opening balance
> Assets:Cash $2000.00
> Equity:Opening balance
>
> 2016/01/10 * Food
> Expenses:Food$100.00
> Assets:Cash
>
> 2016/02/10 * Food
> Expenses:Food$100.00
> Assets:Cash
>
> 2016/03/10 * Food
> Expenses:Food$100.00
> Assets:Cash
>
> 2016/04/10 * Food
> Expenses:Food$100.00
> Assets:Cash
>
> 2016/05/10 * Food
> Expenses:Food$100.00
> Assets:Cash
>
> 2016/06/10 * Food
> Expenses:Food$100.00
> Assets:Cash
>
> 2016/07/10 * Food
> Expenses:Food$100.00
> Assets:Cash
>
> 2016/08/10 * Food
> Expenses:Food$100.00
> Assets:Cash
>
> 2016/09/10 * Food
> Expenses:Food$100.00
> Assets:Cash
>
> 2016/10/10 * Food
> Expenses:Food$100.00
> Assets:Cash
>
> 2016/11/10 * Food
> Expenses:Food$100.00
> Assets:Cash
>
> 2016/12/10 * Food
> Expenses:Food$100.00
> Assets:Cash
>
> --8<---cut here---end--->8---
>
> Commands I tried (with their results):
>
> --8<---cut here---start->8---
> $ ledger -p "this year" --monthly --average balance ^expenses --file
> average.ledger
> $50.00 Expenses:Food
> $ ledger -b 2016/01/01 -e 2016/12/31 --monthly --average balance ^expenses
> --file average.ledger
> $50.00 Expenses:Food
> $ ledger -b 2016/01/01 -e 2016/06/30 --monthly --average balance ^expenses
> --file average.ledger
> $33.33 Expenses:Food
> --8<---cut here---end--->8---
>
> Am I doing something wrong or is this a bug?
Weird. Substitute `balance` with `register`, and you'll get correct
results. I don't know why this doesn't work with `balance`.
--
Ivan Stefanic
--
---
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.