Forum Discussion
Anonymous
6 years agoNot applicable
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...
- 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.
Anonymous
6 years agoNot applicable
Hi camargos88 ,
Yes! This is exactly what I was trying to figure out. I didn't consider using list.combine, it was what was missing for reasoning.
Anyway, I didn't understand what {_b} means, could you please explain?
And really thanks for the help!
My best regards!!
camargos88
Community Champion
6 years agoHi Anonymous ,
I'm glad it helped.
The function List.Combine has a parameter (list of lists). So you need to convert _b to a list.. that's why {_b}.
- Anonymous6 years agoNot applicable