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.
What is your back-end data source? If it is SQL, your GROUP BY in Power Query *may* get pushed down into the native T-SQL statement that Power Query issues to the server. If so, such grouping is done by SQL instead of the Power BI mashup engine. Pretty nice. If you are not sure, investigat the topic of "Query folding in Power Query".