Re: Filter by acount and related account

2020-12-29 Thread Savo
The any() command did it. Thanks. On Tuesday, December 29, 2020 at 8:25:41 AM UTC-5 Martin Michlmayr wrote: > * Martin Michlmayr [2020-12-29 21:09]: > > reg Expenses:Entertainment:Streaming -l "any(account =~ > /Liabilities:Credit Card:VISA/)" > > > > > I tried using the -r and --limit

Re: Filter by acount and related account

2020-12-29 Thread Martin Michlmayr
* Martin Michlmayr [2020-12-29 21:09]: > reg Expenses:Entertainment:Streaming -l "any(account =~ /Liabilities:Credit > Card:VISA/)" > > > I tried using the -r and --limit option, but it did not work. > > No, you need: any(account =~ /.../) Just to make this clearer. Let's say you have a

Re: Filter by acount and related account

2020-12-29 Thread Martin Michlmayr
* Savo Lazic [2020-12-28 18:48]: > I know how to individually filter for Streaming and VISA. I am not > able to figure out how to pull out all the records of Netflix being > payed for by VISA only using the account (Streaming) and related > account (VISA) identifiers. I do not want to use payee

Re: Filter by acount and related account

2020-12-29 Thread john nduli
You could try to use regexes for this. Something like this: ledger reg "expr" "payee =~/.*netflix.*/" and "expr" "account =~ /.*Streaming/" On Tue, Dec 29, 2020 at 7:16 AM Savo Lazic wrote: > > Here is an example ledger: > > 2015-03-16 NETFLIX.COM > Expenses:Entertainment:Streaming >

Filter by acount and related account

2020-12-28 Thread Savo Lazic
Here is an example ledger: 2015-03-16 NETFLIX.COM Expenses:Entertainment:Streaming Liabilities:Credit Card:VISA $-7.99 2015-04-16 NETFLIX.COM Expenses:Entertainment:Streaming Liabilities:Credit Card:Mastercard $-7.99 I know how to individually filter for Streaming