To self-answer my first question, the winning combination seems to be: SELECT last(date) as on_date, convert(value(sum(position)),'USD') as Net_Worth WHERE account ~ 'Assets:*.' or account ~ 'Liabilities:*.'
On Sat, May 19, 2018 at 2:55 PM Filip Miletic (Филип Милетић) < fil...@gmail.com> wrote: > Hi all. > > I'd like to use BQL to compute net worth change over time. As first step > I just want to compute > net worth and work from there. > > So I formulate the query: > > SELECT sum(value(position)) as Net_Worth > WHERE account ~ 'Assets:*.' or account ~ 'Liabilities:*.' > > Ideally, the output of the above query would be no different than the > `networth` command. So, the intention is to show the net worth in USD. > However, I found that I can't seem to get bean-query to convert the > positions held in non-USD currency into USD. None of the functions found > in the bql document > <https://docs.google.com/document/d/1s0GOZMcrKKCLlP29MD7kHO4L88evrwWdIO0p4EwRBE0/edit#heading=h.od3iaob8sala> > seem to work. What am I missing? > > Second question, once the above is solved, how would I use bql to show net > worth per month? > > Thanks, > F > > > > > > -- 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 post to this group, send email to beancount@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/CAKaOXijyhPkhcpBBX4ShaBiac7%3D106vhMyd-2rysym8poRwtQg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.