On 2016-04-02 17:15:44 +0000, Matt Burke said:

To understand my spending, I like to look at spending per month in each account for the past few months. I haven't been able to find an easy (ledger native) way to do this yet.

For example, I'd like to see something like:

Expenses:Groceries 2016-01 $ 25.20
Expenses:Groceries 2016-02 $ 28.50
Expenses:Groceries 2016-03 $ 35.40
Expenses:Utility:Gas 2016-01 $ 12.45
Expenses:Utility:Gas 2016-02 $ 13.89
Expenses:Utility:Gas 2016-03 $ 11.56

A format with columns for each period would also be acceptable:

                        2016-01     2016-02     2016-03
Expenses:Groceries       $25.20      $28.50      $35.40
Expenses:Utility:Gas     $12.45      $13.89      $11.56

The closest I've come so far, is manually manipulating a monthly register report (`ledger reg -M`) by manually adding dates to every row, using awk to reorder the columns, and using sort to group things together.

Can ledger show me what I want natively?

How about this:

ledger reg --monthly -p 'this year' --format '%(account)\t%(format_date(date, "%Y-%m"))\t%(amount)\n' groceries

I don't know if you may sort by account using --sort or --period-sort. Others certainly know better.

Enjoy,
Life


--

--- You received this message because you are subscribed to the Google Groups "Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to