ah I see, i misunderstood what you were after.
to solve the first problem would have just been a case of using 'scroll'
set TargetX to scrollx + (Gamepad.Axis(0,2)*width*0.5)
but that's not really relevant now I understand what you want..
if you create some extra vars you can try this:
add Gamepad.Axis(0,2)*sensitivity to OffsetX
add Gamepad.Axis(0,3)*sensitivity to OffsetY
set TargetX to OffsetX + ScrollX
set TargetY to OffsetY + ScrollY
you can use clamp() to limit the Offset inbetween the view edges using the ViewportLeft/Right/Top/Bottom expressions.
if you wish to implement layout scaling or layout rotation to your game, you should create a UI layer with that does not scroll, scale or rotate, then there's no need to add on the ScrollX or ScrollY.
If you do that though, you then need to determine what the TargetX is on the actual gameplay layer, so you may need to use the CanvasToLayer() expression