(Daniele, is there a nicer way than splitcomp(account, ":", 1)?
Getting a particular subaccount seems pretty common. Also, I
couldn't figure out a way to extract 2 subaccounts - Expenses:Foo:Bar
should yield Expenses:Foo and Expenses:Foo should also yield
Expenses:Foo; is that possible?)
The root(account, 2) will give ''Expenses:Foo'
https://groups.google.com/g/beancount/c/uFvBBL5WUcA/m/bO-nQJHkBAAJ
https://github.com/beancount/beanquery/blob/804087aa014cae46c055a461b994fe0e95517fd4/beanquery/query_env.py#L251
* Martin Michlmayr <t...@cyrius.com> [2023-12-21 18:51]:
> bean-report is deprecated.
>
> You can do the following in bean-query:
>
> SELECT PARENT(account), position, balance WHERE account ~
'Expenses:Test:'
>
> you can also use PARENT(PARENT(account))
>
> This is for register report. For balance report, something like that:
>
> SELECT PARENT(account), SUM(position) WHERE account ~ 'Expenses:Test:'
GROUP BY PARENT(account)
>
> (There might be more elegant ways of doing this, but the queries above
> work for me.)
>
> Martin
>
>
> * Dan Andersson <danande...@gmail.com> [2023-12-21 02:38]:
> > Hi,
> >
> > Example bean-report output:
> >
> > Expenses:Test:Foo 2 USD
> >
> > Expenses:Test:Foo 4 USD
> >
> > How can I automatically show summations for all super-accounts? For
> > example
> >
> > Expenses 6 USD
> >
> > Expenses:Test 6 USD
> >
> > Expenses:Test:Foo 2 USD
> > Expenses:Test:Foo 4 USD
> > Thanks,
> > Dan
> >
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Beancount" group.
> > To unsubscribe from this group and stop receiving emails from it, send
> > an email to [1]beancount+...@googlegroups.com.
> > To view this discussion on the web visit
> > [2]https://groups.google.com/d/msgid/beancount/ff1ad476-8e0c-4cd2-ac1c-
> > 4eec19af8554n%40googlegroups.com.
> >
> > References
> >
> > 1. mailto:beancount+...@googlegroups.com
> > 2.
https://groups.google.com/d/msgid/beancount/ff1ad476-8e0c-4cd2...@googlegroups.com?utm_medium=email&utm_source=footer
<https://groups.google.com/d/msgid/beancount/ff1ad476-8e0c-4cd2-ac1c-4eec19af85...@googlegroups.com?utm_medium=email&utm_source=footer>
>
> --
> Martin Michlmayr
> https://www.cyrius.com/
--
Martin Michlmayr
https://www.cyrius.com/
--
You received this message because you are subscribed to the Google Groups
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/beancount/ce529124-065e-4827-a460-2d08b315ca13n%40googlegroups.com.