If you want to place the label at the end of the line, try to use the following formula for x coordinate:

    x(end_point(centroid($geometry )))

And use the following formula for y coordinate:

    y(end_point($geometry ))

Please note the above formula will work when the line is in vertical orientation, as in your case. 

But if the line is in horizontal orientation, you should use centroid in y coordinate not in x, as follows:

   x----> `x(end_point($geometry ))`

   y----> `y(end_point(centroid($geometry )))`

[![enter image description here][1]][1]


  [1]: https://i.sstatic.net/wGGz8.png