this is my test file:
2024-1-1 Opening Balances
assets:broker 1000 AAPL
assets:broker 1000 "CNR.TO"
assets:broker 1000 "BAYN.DE"
assets:broker 100 USD
assets:broker 100 CAD
assets:broker 100 EUR
Equity:Opening Balances -1000 AAPL
Equity:Opening Balances -1000 "CNR.TO"
Equity:Opening Balances -1000 "BAYN.DE"
Equity:Opening Balances -100 USD
Equity:Opening Balances -100 CAD
Equity:Opening Balances -100 EUR
P 2024-03-15 AAPL 172.62USD
P 2024-03-15 "CNR.TO" 174.28CAD
P 2024-03-15 "BAYN.DE" 26.24EUR
and these are the results:
$ ledger -f test.j --args-only bal assets:broker --limit
'commodity(lot_price(amount)) == "EUR"'
100 EUR assets:broker
$ ledger -f test.j --args-only bal assets:broker --group-by
'commodity(lot_price(amount))'
"BAYN.DE"
1000 BAYN.DE assets:broker
"CNR.TO"
1000 CNR.TO assets:broker
AAPL
1000 AAPL assets:broker
CAD
100 CAD assets:broker
EUR
100 EUR assets:broker
USD
100 USD assets:broker
not what was expected.
On Saturday, March 16, 2024 at 1:07:51 PM UTC-4 Tavis Ormandy wrote:
> On 2024-03-16, lipp f wrote:
> > sure. let's assume the I have the following in the broker account:
> > - 1000 AAPL @ 172.62USD
> > - 1000 CNR.TO @ 174.28CAD
> > - 1000 BAYN.DE @ 26.24EUR
> > - 100 USD cash
> > - 100 CAD cash
> > - 100 EUR cash
> > the value of all assets priced in EUR is 1000 BAYN.DE @ 26.24EUR plus
> 100
> > EUR cash, which means 26340EUR. i want to limit bal / reg to those two
> > assets.
> > *-*
> >
>
> I see, I think maybe --limit 'commodity(lot_price(amount)) == "EUR"',
> but try --group-by too.
>
> (You might need to tweak it, depends on how you record things)
>
> Tavis.
>
> --
> _o) $ lynx lock.cmpxchg8b.com
> /\\ _o) _o) $ finger [email protected]
> _\_V _( ) _( ) @taviso
>
>
--
---
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/87fb119f-9a44-4722-8187-030ef131b39bn%40googlegroups.com.