Re: Issue with average expenses

2016-09-18 Thread freak . fred
 

> Am I doing something wrong or is this a bug? 
>
>
I find this very confusing, too. It seems that --monthly and --average 
together only work well when applied to the register command.

And yes it seems to be a bug already recorded two years ago:
http://bugs.ledger-cli.org/show_bug.cgi?id=1087

-- 

--- 
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.


Re: Issue with average expenses

2016-08-16 Thread John Wiegley
> "MB" == Marcin Borkowski  writes:

MB> I tried to compute my average monthly expenses like shown in the manual,
MB> however, I started to get strange figures. Here's a kind of "minimal
MB> working example" (or rather, a "minimal non-working example").

The --average option is known not to behave well with balances.

-- 
John Wiegley  GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com  60E1 46C4 BD1A 7AC1 4BA2

-- 

--- 
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.


Re: Issue with average expenses

2016-08-16 Thread Ivan Stefanic
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.