Re: squash weekly totals across sub-accounts?
* Alan [2022-11-09 16:42]: > I have some of my Expense accounts organized hierarchically. For example, > rather than simply "Expenses:Food" I have a few accounts, such as: > >- Expenses:Food:Groceries >- Expenses:Food:Chicken >- Expenses:Food: ... (a few others) For "bal", adding "--display 'l <= 2'" will do what you want For reg, I think --depth 2 in Git will do what you want thanks to https://github.com/ledger/ledger/pull/1901 -- Martin Michlmayr https://www.cyrius.com/ -- --- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/ledger-cli/Y2xko4jtxOq71MMu%40jirafa.cyrius.com.
Re: squash weekly totals across sub-accounts?
> "A" == Alan writes: A> I have some of my Expense accounts organized hierarchically. For example, A> rather than simply "Expenses:Food" I have a few accounts, such as: A> Expenses:Food:Groceries A> Expenses:Food:Chicken A> Expenses:Food: ... (a few others) A> But now I would like to get a weekly or monthly subtotal (using `-W` or A> `-M`), summed across all Food categories. If I just query `reg A> Expenses:Food` then of course as a regular expression that matches all of A> the sub-categories individually. If I add `--depth 2` then it ignores all A> the subcategories, reporting only the cases where the ledger has just A> "Expenses:Food" exactly. Actually, `--depth 2` should be exactly what you need, according to the --help description: Limit the depth of displayed accounts in balance and register reports. Any accounts of greater depth are folded into their parent at the specified level. For example with --depth 2 the account Expenses:Entertainment:Dining would be folded into Expenses:Entertainment for display. Importantly, this is a display predicate, which means it only affects display, not the total calculations. I'm rather surprised if it is truncating the totals as you describe. Can you reproduce the issue in a small test case? John -- --- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/ledger-cli/m2sfirh9kq.fsf%40newartisans.com.
squash weekly totals across sub-accounts?
I have some of my Expense accounts organized hierarchically. For example, rather than simply "Expenses:Food" I have a few accounts, such as: - Expenses:Food:Groceries - Expenses:Food:Chicken - Expenses:Food: ... (a few others) But now I would like to get a weekly or monthly subtotal (using `-W` or `-M`), summed across *all* Food categories. If I just query `reg Expenses:Food` then of course as a regular expression that matches all of the sub-categories individually. If I add `--depth 2` then it *ignores* all the subcategories, reporting only the cases where the ledger has just "Expenses:Food" exactly. Can this be done? -- --- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/ledger-cli/c7e19a9c-2864-45f4-9ad1-fb7fce3e2361n%40googlegroups.com.