Chart difference between 2 accounts (Fava)

81 views
Skip to first unread message

mpl...@gmail.com

unread,
Aug 27, 2019, 3:35:47 PM8/27/19
to Beancount
Guys hi,

Is it possible to chart difference between 2 accounts ?

Let say i have 2 accounts
Income:Business:Company1
Expenses:Business:Company1

Right now i see charts for them individually at
localhost:5000/myledger/account/Income:Business:Company1 and
localhost:5000/myledger/account/Expenses:Business:Company1

Can i see chart for "Income:Business:Company1" + "Expenses:Business:Company1" ?

Vivek Gani

unread,
Sep 16, 2019, 7:23:59 PM9/16/19
to Beancount
There's a couple things you can try in fava:

1. Go to fava's income statements:
2. In the upper right advanced filter enter in (without begin/end quotes):
"any(account:"Expenses:Business:Company1"), any(account:"Income:Business:Company1*")"
This should at least filter down to the business itself and show a net profit chart. You can then add a 'fava-sidebar-link' so you can easily get to it.

Alternatively, you may want to consider making a fava 'extension report' to do a custom view of multiple charts. Extension Reports should now be in the latest 1.11 version of Fava.

mpl...@gmail.com

unread,
Sep 24, 2019, 11:24:48 AM9/24/19
to Beancount
Vivek hi,

Thank you for your reply

Seems like it's not working for me, it filters out some of the accounts, but still lots of non Company1 accounts are present.
(so it filters but not fully)

Could you understand what i am doing wrong ?

I am entering in field called "Filter by tag, payee, ..." ?
(I have 3 fields in upper right total: "Time", "Account" and "Filter by tag, payee, ...")

Also i see that "any(account:"Expenses:Business:Company1") does not have "*"
and any(account:"Income:Business:Company1*")" does have "*".
Tried adding and removing them - still no luck.

mpl...@gmail.com

unread,
Sep 24, 2019, 11:59:13 AM9/24/19
to Beancount
And where can i read more on this "any(account:"X"), any(account:"X*")" expression ?
Can't find it in neither in fava nor in beancount docs.

Vivek Gani

unread,
Sep 24, 2019, 2:34:11 PM9/24/19
to Beancount
May help if you can share an example. The "*" shouldn't matter, all that will do is show sub-accounts in the treeview of accounts (helpful if you have say "Income:Business:Company1:ProductA", ProductB, etc.). 


I was a bit hasty in my first reply, I copied it from a usecase I track for work-related expenses and reimbursements - where my filter is "any(account:"Expenses:WorkExpensables:*"), any(account:"Income:WorkExpensables:*")"


Screen_Shot_2019-09-24_at_11_14_35_AM.png



It can have issues, though, in showing things outside of Company1 if you have transactions that have multiple postings dealing with the root 'Company1' and outside of 'Company1'. 
In my above image, I actually have this showing up in one 'Food-Dining' Transaction where it looked like

2018-01-01 * "RESTAURANT" "dinner"
  Liabilities:CreditCard   -20 USD
  Expenses:CompanyA:Food             10 USD 
  Expenses:Personal:Food          10 USD

I haven't figured out how to handle this scenario elegantly yet, some just split these types of transactions out.

The any expression is particular to fava and documented in it's own help menu (e.g. see: https://fava.pythonanywhere.com/huge-example-file/help/filters/ ) . some more discussion in https://github.com/beancount/fava/issues/768 
 
-Vivek

mpl...@gmail.com

unread,
Sep 25, 2019, 10:49:00 AM9/25/19
to Beancount
"It can have issues, though, in showing things outside of Company1 if you have transactions that have multiple postings dealing with the root 'Company1' and outside of 'Company1'."
-that's exactly the issue i have.

"I haven't figured out how to handle this scenario elegantly yet, some just split these types of transactions out."
-i guess that what i will have to do as well.

"The any expression is particular to fava and documented in it's own help menu (e.g. see: https://fava.pythonanywhere.com/huge-example-file/help/filters/ ) . some more discussion in https://github.com/beancount/fava/issues/768"
-thank you!

On Tuesday, August 27, 2019 at 3:35:47 PM UTC-4, mpl...@gmail.com wrote:
Reply all
Reply to author
Forward
0 new messages