Skip to main content
Showing results for 
Search instead for 
Did you mean: 

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Not applicable

Cumulative List of List of Lists



I am trying to create cumulative lists of several nested lists in a list of list. Right now I can only get it to run one specified nested list but I would like it to run on all nested list and present a list of lists with the cumulative data as a result.


Here is my list of list and in the first nested list you can see that I have some values that I want to create a cumulative list from.


= Table.ToColumns(Table.Buffer(#"Removed Columns1"))




Here I have created a operator thata create a cumulative list using List.Accumulate. But I have to specify that I want it to be the first list, BufferedTables{0}, for it to run. 


= List.Skip(List.Accumulate(BufferedTables{0},{0},(state,current)=> state & {List.Last(state) + current}))



If I do not specify which nested list to run I get this error. 


= List.Skip(List.Accumulate(BufferedTables,{0},(state,current)=> state & {List.Last(state) + current}))




Can this be done in a way that I do not have to hardcode the amount of lists I want it to run? instead I just want it to go through all nested lists in the list of lists. 



Super User
Super User

Is the nesting level dynamic?  You may want to look into recursive functions (not just iterations, true recursions).

Helpful resources

July 2024 Power BI Update

Power BI Monthly Update - July 2024

Check out the July 2024 Power BI update to learn about new features.


Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors