>>>>> Martin Michlmayr <[email protected]> writes:

> You want to --group-by the Assets: account to find on which broker account
> you received dividends, e.g.:

>     bal Income:Dividends --group-by get_account("^Assets:Broker")

I'm not sure this means what you expect it to mean...

--group-by EXPR evaluates EXPR *for every entry in the report* and then groups
the results by the strings yielded from that evaluation.

What you seem to want is this:

  1. for an entry that matches account X
  2. filter the *other* posts in that transaction by those matching account Y
  3. use the (assumed single) account name resulting from this for grouping

This can't be done with Ledger's command-line option, although it would be
possible as a Python script.

John

-- 

--- 
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/m2a65duf42.fsf%40newartisans.com.

Reply via email to