I have generated a dynamic list of tables using list.generate function. May I know how to expand each table from list and append columns of each tables. Column 2 is reference column and append Column 3 of each table.
Hi Tan,
Can you clarify please? Hard to see your structure.
You have the list of tables in a list object? Or it's just in a new column in a table object?
Hi Catalin,
It is the list of tables in a list object. Actually I would like to perform looping function but I don't know how to write the iteration code. The looping step is to get the table data from table in list position 0, then append column 3 of the table to a reference column. Then perform the loop for next table.
Hi Tan,
You can convert the list to a table and expand only column 3, this will provide a single column result.
Not sure what means appending to a reference column, where is that reference column?
For example, the following line will take a list of tables (Custom1) and combines then one by one, at each iteration, starting from an empty table #table({},{}) :
= List.Accumulate(Custom1,#table({},{}),(current,state)=>state & (current))
Hi Catalin,
I able to generate list of tables. Each table has same column headers [Column2] and [Results]. The number of tables in the list is more than hundreds. I would like to perform like table.nestedjoin function for [Column2] and append each [Results] of table. I am thinking to use list.accumulate but it would have same column name for each iteration of joining. May I know how to solve this?
Source is list of tables.
Table.NestedJoin(Source{0}, {"Column2"}, Source{1}, {"Column2"}, "Final", JoinKind.LeftOuter)
You can use this step, assuming that PreviousStepName is a list of tables:
= Table.FromColumns(List.Skip(List.Accumulate(PreviousStepName,{{}},(state,current)=> state & {current[Results]} ),1))
Hi Catalin,
It works and solved. Thanks much.