Something like this would work well. Key differences to what you're doing is it adds to instead of sets the rotx variable. Also instead of the touch speed expression here we find the xvelocity since that gives a direction in addition to speed.
global rotx=0
global xvelocity=0
global px=0
on touch start
-- set px to touch.x
is touching sprite2
-- set xvelocity to (touch.x-px)/10
-- set px to touch.x
every tick
-- add xvelocity*dt to rotx