Forum Discussion

datasith's avatar
datasith
Copper Contributor
Jun 14, 2021
Solved

Counter variable in Power Query each loop

          /* [Index] and [Initial Stock] are columns in the Table that I can reference. */ /* I'm curious how to have an "i" variable accessible in the M code */ #"Added Index II" ...
  • Yea_So's avatar
    Jun 21, 2021

    Hi datasith,

     

    This series article might put you back on track:

    https://www.data-insights.de/loops-in-m-recursion/

     

    https://www.data-insights.de/loops-in-m-language-list.generate/

     

    https://www.data-insights.de/part-3-for-next-loop-using-list-accumulate-in-m-for-power-query/

     

    Hope that helps you.

     

    cheers

     

Resources