Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Power Query - Loop calculating

Hi,   I have the following Excel table:   The column A and B are given data. The column A represents a duration of tasks in decimal format. And the column B represents the end date of the f...
  • camargos88's avatar
    6 years ago

    Hi Anonymous ,

     

    First, create a index column and this code for a custom column:

    let _b = #"Added Index"[B]{0} in
    List.Accumulate(
    List.Combine(
    {{_b},
    List.Range(#"Added Index"[A], 0, [Index] + 1)}),
    0, (s, c) => s + c)

     

     

    Change the bold part with your last step name.