How can I use the rollupCurrencySum and only obtain certain records?

Here is our use case:

We have a custom field with a year field.

Accounts has a 1 to Many relationship with the custom module

I want this

rollupCurrencySum($mymodule_accounts, "amount") 

where

equal(related($mymodule_acounts, "year"), "2014")?

how can I limit my rollupCurrencySum to only this year?