I believe this is what you are looking for.
The expression will be like : field2=rangesum(above(if(aggr(max ( f1),Ano)=1,1,0),0,RowNo())).
I have attached the sample I used to come up with the result.
I ahve a productiondate, f1 (field1) and Ano (AccountNo). You can see the field 2 result in the chart,
Please let me know if this helps.
test1.qvw 149.5 K