'how can i copy a value of a column and copy it to another column or measure?

i have a column like this one, and i want to copy de last value, different of 0, in each row of the new column

Col 1 New Col
1 5
2 5
3 5
4 5
5 5
0 5
0 5
0 5


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source