On 2023-01-24, at 01:06, John Wiegley <[email protected]> wrote:

>>>>>> o1bigtenor  <[email protected]> writes:
>
>> That - sir - - - -begs the question - - - what is 'average' supposed to do?
>
> Average just takes the number of entries in a group, and divides the total by
> the count. Here's the implementation:
>
>   OPTION_(report_t, average, DO() { // -A
>       OTHER(empty).on(whence);
>       OTHER(display_total_)
>         .on(whence, "count>0?(display_total/count):0");
>     });
>
> Which means that `--average` is just a short-hand for:
>
>   --empty --display-total "count>0?(display_total/count):0"

Thanks for the answer, but that still does not explain the "450" figure
for me.  Of course, the total is 2700, so I assume Ledger divided it by
6 -- but why 6?

(Also, since I've decided to finally finish my booklet on accounting
with Ledger, expect more questions soon;-) -- hope that's ok with
you...)

Best,

-- 
Marcin Borkowski
http://mbork.pl

-- 

--- 
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/87o7qonzwq.fsf%40mbork.pl.

Reply via email to