Hello Olaf,
I don't believe a filter is going to get you what you need, but a custom
group should. If I understand your question correctly, you want to be
able to total the costs for only certain selected tasks.
Insert the Flag fields as you suggest and set the flags as needed.
Create a custom group through Project > Group By > More Groups. Click
the New button to create a new group. The first Group By row in the new
custom group should be your flag field.
When you apply the group if you have included the Cost field in the
table you should see the sum of each Flag option - "yes" and "no".
I hope this helps. Let us know how you get along.
Julie
Project MVP
Visit
http://project.mvps.org/ for the FAQs and additional information
about Microsoft Project