On Tue, Oct 25, 2011 at 8:56 AM, Craig Earls <[email protected]> wrote: > So you want each hierarchical level sorted independently? It's an > interesting report, what does it tell you? I am not completely clear on how > ledger uses the hierarchy when sorting. I have come up against a similar > question myself in the past but didn't pursue it. I need to think about > this. > I am more interested in how much I'm spending on food as a whole rather than the individual compoents of it. Similarly for insurance, or my car, etc., etc.
This is what --sort -T does the only problem is that the income is the wrong way around. > On Mon, Oct 24, 2011 at 14:32, Peter Ross <[email protected]> wrote: >> >> Income -10,000 >> Income:Salary -9000 >> Income:Interest -1000 >> Expenses: 4000 >> Expenses:Food 3000 >> Expenses:Food:Groceries 2900 >> Expenses:Food:Dining Out 100 >> Expenses:Other 1000 >> >> my example below outputs >> >> Expenses: 4000 >> Expenses:Food 3000 >> Expenses:Food:Groceries 2900 >> Expenses:Food:Dining Out 100 >> Expenses:Other 1000 >> Income -10,000 >> Income:Interest -1000 >> Income:Salary -9000 >> >> >> On Tue, Oct 25, 2011 at 8:19 AM, Craig Earls <[email protected]> wrote: >> > I don't completely understand what you are trying to accomplish. Can >> > you >> > post a simplified hand generated example of what report format you are >> > trying to achieve? >> > >> > On Mon, Oct 24, 2011 at 14:10, Peter Ross <[email protected]> wrote: >> >> >> >> On Tue, Oct 25, 2011 at 12:19 AM, Craig Earls <[email protected]> >> >> wrote: >> >> > In ledger 3 you need to give --sort a value expression to sort on. >> >> > >> >> > Some thing like >> >> > >> >> > ledger bal --sort "abs(amount)" --flat >> >> > >> >> > the flat argument overides allows it to sort subaccount by value >> >> > rather >> >> > than >> >> > the account at each hierarchical level. >> >> > >> >> Thanks, I am using version 3. However I don't want the flat output >> >> but the hierachical output. >> >> >> >> I tried >> >> >> >> ledger --sort '-abs(total)' bal '^income' '^expenses' >> >> >> >> however the income which is greater than my expenses still appeared at >> >> the bottom and was sorted in the incorrect order. >> >> >> >> Is the above correct? >> > >> > > > > > -- > Craig, Corona De Tucson, AZ > enderw88.wordpress.com >
