Make a number series incremental

Hi Fellow users,

I’m trying to convert a number series into an increasing one. Example data are as below:

|Date | Origin Data | Desired Result | |

|2023-07-01 | 1 | 1 | |

|2023-07-02 | 2 | 2 | |

|2023-07-03 | 5 | 5 | |

|2023-07-04 | 8 | 8 | |

|2023-07-05 | 10 | 10 | |

|2023-07-06 | 14 | 10 | |

|2023-07-07 | 12 | 10 | |

|2023-07-08 | 11 | 10 | |

|2023-07-09 | 10 | 10 | |

|2023-07-10 | 13 | 13 | |

|2023-07-11 | 15 | 15 | |

In excel i can use a IF function to handle it, so I tried “lag column” node to compare values in two row and get the smaller one. But soon I realize it did not work since this comparision is dynamic in excel across whole sheet, and “lag column” is a static one.

So I guess I need a loop function, step from the largest date(and also the “should be” largest data), comparing 2 row at a time. Then move it all the way down to finish the task.

Anyone have idea on this?

Thanks in advance!