Hello @orb204 and welcome to the SAS Support Communities!
Just insert variable month as the second BY variable and use first.month instead of first.Jurisdiction to indicate where the counter is to be reset to zero:
proc sort data=atm_top_value out=atm_top_value1;
by jurisdiction month descending amount;
run;
data atm_top_value2;
set atm_top_value1;
by jurisdiction month;
if first.month then cnt = 0;
cnt + 1;
if cnt <= 10;
run;
(Note that I also simplified the code a bit.)
General recommendation: For quicker answers please open a new thread when you have a question. Only a few people will notice that an old thread (like this from October 2018 or actually even April 2016) has been continued. If you want to refer to an old thread, you can provide a hyperlink like this: https://communities.sas.com/t5/SAS-Programming/proc-sort-and-select-10-largest-values/m-p/500910.
... View more