The short answer is no, you can't use conditional expressions in a total formula.

The solution would be to make the data source of the report an SQL view that does the aggregation you need. It would involve one query to aggregate the needed values, and then another one that uses that query as a derived table. That "outer" query could have a column defined by a conditional expression using the "total" column from the "inner" query.

Regards,
Bob