I'm not sure if this it what you are asking or not.
Global variable StartX, EndX
On Touch Start set touch.x to StartX
On Touch End set touch.x to EndX
Compare StartX and EndX
Or is it going to be using Y coordinates as well?
In that case, you could create a hidden sprite at Touch, then create a hidden sprite at touch end. Then check the distance using the distance expression, then destroy the two hidden sprites.