The easiest solution is probably to summarize the dataset first by the identifier:
proc sql;
select biggerstuff, identifier, max(depvar)
from yourdataset
group by biggerstuff,identifier;
quit;
Then insert that in your larger query in the place of the 'from' statement (select blah, count(identifier), sum(depvar)). Once you've pre-summarized it in the inner query you know that you only get 1 row per identifier so distinct isn't needed any longer.