I am trying to get the previous output for my latest input for each step.

As you can see from the table above, for step no 80, the input needs to be 90 as the output from step 70 is 90.
Is there a DAX formula that can do this

Can I ask if the initial step (step 10) to have the initial input as well?
Cos right now its blank due to the DAX getting previous step and step 10 has no previous step.

Hi Roger,
Thanks so much! This works great too, just awesome!

Can I also ask one more question?
What if I want to calculate the latest output and divide it over the first input, so in this case 70/100, what would be the DAX for it?
Thanks again.

hallo
attached the pbix with the new measure using variables.
you can wrap the two measures ( colored in red ) in a new measure assigning each to a variable and use the function divide() to get the result.
If this is what you are looking for you can delete the two measures TOTAL LATEST INPUT WF
and
TOTAL LATEST OUTPUT WF,
if you need them in a visual then don’t delete.
Attached also a link to a video on how to use the window function.