Yes.
The terminology you use is a bit different than the one I usually refer to,
but I think we're saying the same thing.
Transaction
Posting1 Amount1
Posting2 Amount2
Posting3 Amount3
where "Transaction" stands for some fields of the transaction selected and
"Posting" some fields for the posting, would result in
Transaction Posting1 Amount1
Transaction Posting2 Amount2
Transaction Posting3 Amount3
The problem I was alluding to is that if you render repeated values, such
as links or balance (a balance is of type "Inventory", which is a list of
positions), the default table rendering would do this:
Transaction Posting1 Amount1 BalancePosition1
BalancePosition2
Transaction Posting2 Amount1 BalancePosition1
BalancePosition2
...
I changed the default to render inventories like this:
Transaction Posting1 Amount1 BalancePosition1.BalancePosition2
Transaction Posting2 Amount1 BalancePosition1,BalancePosition2
It just makes a large balance cell, but it's more rational and it's what I
always thought it should be.
Besides, if you have only a single currency, or if you convert to one (or
market value), the inventory in the balance would have a single position
and it wouldn't matter.
The shell now has an "expand" shell variable to control this and keep the
old behavior. (Eventually I'll probably fold this into the SQL syntax
itself, I think that's where it deserves to be.)
So, it turns out I recently was on vacation with my girlfriend and she was
complaining tonight that my export of our expenses were difficult to review
in text format, so after doing this I had a quick go at implementing CSV
rendering for bean-query and so I did it... it works. bean-query now takes
a -f/--format=csv option and you should be able to import that into a
spreadsheet.
Note the existence of the upload-csv-google-sheet in Beancount, which
allows me to provide an existing Sheets doc id and a list of filenames, and
the script creates sheets automatically, uploading all the data. This is
convenient. I just used it to share our vacation expenses. (It can be a
little flaky but it works; I need to convert it to the recently released
new Google Sheets API, at the moment it's using gdata, which is ancient,
but still sort of works).
There's a final twist: Not expanding rows by default is probably not enough
in some cases. If you select a column of type Amount (like "units", or
"cost"), the value rendered will be the number and its currency in a single
cell, like this: "324.34 USD". Importing this in a column won't make it
possible to do calculations on it. What you could do is just select the
number. Anyhow, I think I'll implement that behavior (rendering Amount's
number and currencies as two columns) and add another option for this soon.
I hope this helps,
On Mon, Aug 15, 2016 at 9:08 AM, Alex Johnstone <[email protected]> wrote:
> Hello,
>
> I've used other finance programs and for "split transactions" they just
> output each account per row, so I think all parts of a transaction should
> have its own row. It means more transactions but it's predictable.
>
> I'd keep it to just the raw data as close as possible, no conversions or
> grouping etc. It adds complexity and it's something I can easily do in
> whatever tool I'm exporting to. However, that's just considering what I
> want to use it for.
>
> Thanks,
> Alex
>
>
>
>
>
> On Sat, Aug 13, 2016 at 9:45 PM -0700, "Martin Blais" <[email protected]>
> wrote:
>
> There are couple of issues. In particular, one needs to
>> - duplicate the desired transaction-specific data for each row (perhaps
>> that's okay)
>> - if the balance is to be rendered, if this balance contains multiple
>> currencies, somehow replicate the row data for each of these
>> - if you want to calculate anything, you'll have to aggregate by currency
>> - convert to cost or market value if necessary.
>> So there's no straightforward general answer... depends what you're
>> trying to do.
>>
>> However, a basic table report can be produced with something like this:
>>
>> bean-query $L 'select date, flag, maxwidth(description, 64), account,
>> number, currency'
>>
>> In order to export, this would be great:
>>
>> bean-query -f csv $L 'select date, flag, maxwidth(description, 64),
>> account, number, currency'
>>
>> But I haven't implemented shell output to CSV yet.
>>
>>
>>
>>
>> On Sun, Aug 14, 2016 at 12:02 AM, Alex Johnstone <[email protected]>
>> wrote:
>>
>>> Ah yes, now that I think about it, it's not as straight forward as I
>>> originally (didn't) think.
>>>
>>> My intent was to get some of the data into a spreadsheet to do some
>>> forecasting, when a foreign account is likely to get low so I can start
>>> preparing a transfer. Plus general trending and charting of various
>>> categories to see what's been happening over time.
>>>
>>> I feel like I may need to write a script to output data from beancount
>>> when it meets certain criteria for what I'm looking for.
>>>
>>> --
>>> 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 [email protected].
>>> To post to this group, send email to [email protected].
>>> To view this discussion on the web visit https://groups.google.com/d/ms
>>> gid/beancount/60512c29-710e-4b55-9b47-c6ff44e9db1e%40googlegroups.com
>>> <https://groups.google.com/d/msgid/beancount/60512c29-710e-4b55-9b47-c6ff44e9db1e%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Beancount" group.
>> To unsubscribe from this topic, visit https://groups.google.com/d/
>> topic/beancount/V-f6JFhR6R0/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> [email protected].
>> To post to this group, send email to [email protected].
>> To view this discussion on the web visit https://groups.google.com/d/
>> msgid/beancount/CAK21%2BhNaUMSF9asDnprQfZmEKdsUremTy
>> MX7vBwTDDFkTr1SAQ%40mail.gmail.com
>> <https://groups.google.com/d/msgid/beancount/CAK21%2BhNaUMSF9asDnprQfZmEKdsUremTyMX7vBwTDDFkTr1SAQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> 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 [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/beancount/23ADF5F8C7089991.D68696F3-E461-486C-B331-53F7C73022BA%
> 40mail.outlook.com
> <https://groups.google.com/d/msgid/beancount/23ADF5F8C7089991.D68696F3-E461-486C-B331-53F7C73022BA%40mail.outlook.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>
--
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/beancount/CAK21%2BhMEu1Chtb_7VYmdL6n2_4xN-3cD36sm-Zqq52DD%3DG9ZpQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.