I think set analysis is evaluated once per chart. You might have to replicate what you are trying to do using if statement here.
Sum(If(Date >= AddMonths(Date,-ToMonth) and Date <= AddMonths(Date, -FromMonth), Amount)
UPDATE: I think you will need to use Aggr() function here and some other set analysis. May be if you can provide a sample which includes the date field, it might become easier to provide a solution here