You can indeed. There a couple methods.
In your report query you have the individual query items that comprise your desired calculation working fine(PASSCOUNT, FAILCOUNT, etc...). You can create a new data item/expression in that same query item list and edit the definition. In the left hand side you can choose to use columns from your original db data source but there is another pane you can select to actually re-use other query items/calculations you have definied in that same query (PASSCOUNT FAILCOUNT FAILRATE). Cognos knows that when you create an expression using other columns in the same query to resolve those query items first in order to resolve your calculation that is dependent upon them. You want to make sure your calculated/derived column is listed after the other dependent query items(Actually this may not matter but it makes sense when looking at it). Also I believe you will have to set the the failure rate query item/expression to "Calculated" as its aggregate method.
The summary line might/might not be a bit trickier. Not having report studio right in front of me it might be smart enough when you add the totals section to the list report and use your new failure rate expression... to extend the correct calculation or you may have to use another method to do the summary which is a report expression.
You create a report expression not in the query but on the gui page of the report(its in the toolbox along side tables, singltons etc...). It has an expression builder just like in the query but you will notice the function set is different because it is being done after the query runs and as the results come back so simple things like you are doing is fine which is just math but you will notice other database functions are not available on report expressions simply because they are occuring in the html output and not during the query run against the database.
Hope this helps. In summary you are creating a calculated column based on the summarized calculations of other columns in the same query/result set. This would be in theory the same as this SQL statement which will not work because SQL does not allow this directly but hope it helps explain what cognos is doing.
Select 1+2 As FAILCOUNT, 2+3 AS PASSCOUNT, (FAILCOUNT/PASSCOUNT+FAILCOUNT) AS FAILRATE From SOMETABLE
-- Cognos is able to use the results other aggregate calculated columns in the same query and if you gen sql you can see how it arranges the SQL to do this.
Thanks,
Tim