Hi Rory,You have to make the key of the dictionary into symbol format
and also the rank error is due to the value d being all atoms and not
list so these must be enlisted.q)d:{count each group y xbar
x}q)x:1000?100q)k:d[x;10]q)k50| 9120| 10130| 11910...