Re: Register report with depth limit and sub-totaling
26 June 2016 г., 14:25:33 UTC+3 Chris Bennett : > > Hey, I was trying to solve this yesterday , failed to find a solution, and > then today I started reviewing the list out of habit and saw your post. > The group-by works perfectly :) Thanks! > > Glad that it was useful for you! Perhaps this example should be added to manual. Also, group-by description in manual looks outdated: --group-by EXPR Group transactions together in the register report. EXPR can be anything, although most common would be payee or commodity. The tags() function is also useful here. It talks about register report only, while it does work for balance report too. Best Regards, Evgeny -- --- 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 ledger-cli+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Register report with depth limit and sub-totaling
Hey, I was trying to solve this yesterday , failed to find a solution, and then today I started reviewing the list out of habit and saw your post. The group-by works perfectly :) Thanks! Chris On 14 June 2016 at 08:14, Evgeny Panasyukwrote: > >> How to achieve this? >> > > I found on web that it is possible to achieve this with balance report > plus special --group-by format: > ; example2.ledger > > 2016/04/30 car > expenses:car:gas 200$ > expenses:car:repair 500$ > expenses:other 50$ > assets:cash > > 2016/05/31 car > expenses:car:gas 100$ > expenses:car:repair 1000$ > expenses:other 5$ > assets:cash > > ledger -f example2.ledger bal --group-by 'format_date(date, "%Y-%m")' --depth > 2 expenses > 2016-04 > 750$ expenses > 700$car > 50$other > > 750$ > > 2016-05 >1105$ expenses >1100$car > 5$other > >1105$ > > > -- > > --- > 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 ledger-cli+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- --- 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 ledger-cli+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Register report with depth limit and sub-totaling
> > > How to achieve this? > I found on web that it is possible to achieve this with balance report plus special --group-by format: ; example2.ledger 2016/04/30 car expenses:car:gas 200$ expenses:car:repair 500$ expenses:other 50$ assets:cash 2016/05/31 car expenses:car:gas 100$ expenses:car:repair 1000$ expenses:other 5$ assets:cash ledger -f example2.ledger bal --group-by 'format_date(date, "%Y-%m")' --depth 2 expenses 2016-04 750$ expenses 700$car 50$other 750$ 2016-05 1105$ expenses 1100$car 5$other 1105$ -- --- 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 ledger-cli+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Register report with depth limit and sub-totaling
On 5/31/16 7:37 AM, Evgeny Panasyuk wrote: I do not want such detailed report, what I want is to limit depth to 2 and get subtotals for each second level account, similar to above balance report. Something like: ledger -f example.ledger reg expenses -M 16-May-01 - 16-May-31 expenses:car 1100$ 1100$ expenses:other 5$ 1105$ How to achieve this? You could use hledger register: ledger -f example.ledger print expenses | hledger -f- reg expenses -M --depth 2 -- --- 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 ledger-cli+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Register report with depth limit and sub-totaling
Hello, all! Let's start with small example: ; example.ledger 2016/05/31 car expenses:car:gas 100$ expenses:car:repair 1000$ expenses:other 5$ assets:cash It is possible to limit level of balance report to depth=2 and get following report: ledger -f example.ledger bal expenses --depth 2 1105$ expenses 1100$car 5$other 1105$ As you can see, for each second level account we get subtotal of all child accounts, i.e. expenses:car = expenses:car:gas + expenses:car:repair I would like to get similar effect for register monthly report. For instance regular register report shows: ledger -f example.ledger reg expenses -M 16-May-01 - 16-May-31 expenses:car:gas 100$ 100$ expenses:car:repair 1000$ 1100$ expenses:other 5$ 1105 I do not want such detailed report, what I want is to limit depth to 2 and get subtotals for each second level account, similar to above balance report. Something like: ledger -f example.ledger reg expenses -M 16-May-01 - 16-May-31 expenses:car 1100$ 1100$ expenses:other 5$ 1105$ How to achieve this? -- --- 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 ledger-cli+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.