Came across this old thread and posting for other who come across it.
Select the layer you want to link to another layer
Press ALT+SHIFT+= to bring up the expression
For position, you’ll see something like thisComp.layer(“LAYER NAME”).transform.position pop up. This affects BOTH axis.
As Steve said,
position[0] = X
position[1] = Y
position[2] = Z
So, add “position[0]” to the front or “position [1]” to the back of the expression to affect only one axis.
For example, this will affect ONLY the X axis:
[thisComp.layer(“LAYER NAME”).transform.position[0],position[1]]
And this will affect ONLY the Y axis:
[position[0],thisComp.layer(“LAYER NAME”).transform.position[1]]
Hope that helps.