Forum Discussion
Fill up only one row
- 4 years ago
Hi Michieldo ,
You can try edit the code for if the next row is null and the current row is not null then get the next row's forecast else your forecast expression. Before this, add an index column firstly.
if #"Added Index"{[Index]+1} [In-sample] = null & [In-sample] <> null then #"Added Index"{[Index]+1} [Forecast] else [Forecast]About how to get the next row values ,you can refer this article.
https://www.myonlinetraininghub.com/referencing-next-row-power-query
Best RegardsCommunity Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
ToddChitt Thanks for your reply, that is indeed a possibility. However, I forgot to mention that I have to do this for over a set of 10000 products (>1M rows) so I was looking for a less memory intensive method.
Hi Michieldo ,
You can try edit the code for if the next row is null and the current row is not null then get the next row's forecast else your forecast expression. Before this, add an index column firstly.
if #"Added Index"{[Index]+1} [In-sample] = null & [In-sample] <> null then #"Added Index"{[Index]+1} [Forecast] else [Forecast]
About how to get the next row values ,you can refer this article.
https://www.myonlinetraininghub.com/referencing-next-row-power-query
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.