Thanks! This works, but I'm struggling to understand the
`--account=commodity` part of the command. There is no example like this in
the documentation. What other options does --account have?

Edwin

On Fri, Dec 2, 2016 at 3:56 AM John Wiegley <[email protected]> wrote:

> >>>>> "ES" == Edwin Stearns <[email protected]> writes:
>
> ES> I would like to create a report that lists market values for an
> account by
> ES> commodity. I want it to look something like:
>
> ES> Commodity   #shares    price/share  market value
>
> ES> XYZ         100.000    $10.00       $1000.00
> ES> ABC          50.000    %12.00        $600.00
>
> ES> I don't see a way to manage this in the documentation. I have a ledger
> ES> file with transactions and historical price data.
>
> Try this:
>
>     ledger --account=commodity --collapse balance
>
> To see the share count, price/share and the market value, you'll need to
> set
> the --total:
>
>     ledger --account=commodity --collapse \
>            --total='(count, total, market(total))' balance
>
> You'll probably need to massage the output, but this should get you part of
> the way there.
>
> --
> 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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to