Use report from search results

kwtm kwtm-meppra at
Sun Apr 17 09:43:42 EDT 2011

I only recently discovered this feature to get a total of the transactions
you want:

First, search for the appropriate transactions.  
Open a tab with your medical bills account, and use "main menu" > Edit >
Find  (or just press Ctrl-F).  
Then set a list of criteria to find only the transactions you want, such as:
  "Date Posted" "is on or after" 01/01/2010   
Then, with the "+Add" button, add another criteria:  
  "Date Posted" "is on or before" 12/31/2010
This will find only the transactions within the year 2010.  You can also add
other criteria like "Description" "does not match regex" "for mom" which
will filter out all transactions named "this was for mom but I just listed
it under my own expenses for convenience" etc.  (A "regex" is text that
you're looking for, except that certain characters like ^$*.?[] etc. have
special meaning.)
Adjust this so that only the transactions you want are there in the search

Then, get an account report using "main menu" > Report > Account Report
while you have the search results tab in front of you.
This generates a report with the listed transactions and includes the total,
so that should give you a total of your medical expenses for 2010, in this

It may or may not be enough to do what you want, and you may want to export
this to a spreadsheet anyway (saving to HTML etc. as others have suggested
in this thread), but hopefully this helps you at least somewhat.

I learned this trick from the IRC channel #gnucash (on the server;
not the same as other channels also named #gnucash on other servers such as  I looked through the documentation, and it wasn't there. 
Also, the Gnucash menu entries are so context dependent that they are hard
to learn; sometimes menu entries only appear for specific circumstances so
you never get around to exploring those.

I am using Gnucash 2.2.9, the version that comes with Ubuntu 10.04, the
current Long-Term Support edition, if it makes any difference.

Looking over the notes, I just noticed you had trouble importing HTML.  What
about selecting the text (of the HTML report) and then cutting and pasting? 
Just a thought --I have no idea whether that will work.

Carpet Nailz wrote:
> Well I tried that. I exported the report as html and then used Calc to
> open it. It still entered the numbers (currency amounts) into the cells
> as references to something and won't let me do any calculations with the
> values. My problem is how to get the numbers into Calc so I can work
> with them. For example, my Medical Expenses report for the year has a
> number of entries that were for expenses incurred last year. So I have
> to delete those to get a total for IRS for my this year's medical
> expenses. I can't do that kind of "fine-tuning" in creating the GnuCash
> report, so I need to do it in a spreadsheet.

View this message in context:
Sent from the GnuCash - User mailing list archive at

More information about the gnucash-user mailing list