Summary Results based on Filtered Value

Then you need to remove the model max.  Which may produce a heap size error,  but it should be your first approach. 

If you do have heap size errors,  you may need to have a second aggregate model that listens to the conditions on your firset model and implemetns them as they are changed.  Pat Vachon has modeled that technique here: