Want to adapt List.Generate for different tasks? This comprehensive tutorial series will help you: kzbin.info/aero/PLoSsgosQ3hShod_6OwiM5htOKBJy5L4uG
@MatthiasFriedmann Жыл бұрын
Here is the code for you: let Source = Excel.CurrentWorkbook(){[Name = "Divide7"]}[Content], #"Added Custom" = Table.AddColumn( Source, "Sum", each List.Sum( List.Generate( () => [n = Number.RoundUp([Number] / 7)], each [n] > 1, each [n = Number.RoundUp([n] / 7)], each [n] ) ) + 1 ) in #"Added Custom"