On Sun, 9 Dec 2018, at 15:51, Martin Michlmayr wrote: > * Martin Michlmayr <t...@cyrius.com> [2018-12-09 17:48]: > > The first is based on an idea from Craig Earls from a few years ago > > and uses automated transactions: > > > > = expr (commodity == 'GOOG') > > (Equities:GOOG) 1.000 > > I forgot to say but this allows you to see percentages too, see > https://www.reddit.com/r/plaintextaccounting/comments/92jux8/how_do_you_calculate_weightshares_of_a_commodity/
Ah yes, now I recall I'm already using this idea (which I imagine came from the same source) for 'asset allocation' percentages. I guess I can also match on the account names of the postings in the expression, which I'd need to separate out some things that I'd normally do with a regular query on the non-virtual transactions. Your pivot idea looks useful too, thank you! Still, I'm a little surprised there's not a more explicit way that neither requires adding extra metadata to duplicate core information like account names that is already present, nor use of automated transactions and consequent loss of information (in queries, without extra effort) about things like account names. If anybody has other reporting tools that operate on ledger files that they'd like to advertise here, it'd be great to hear about them! Even if they don't solve this particular problem, they might help me and others write something that does what I want more easily. -- --- 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.