Downloads
Power Query MList: transform and filterIntermediate

List.Combine

Joins a list of lists into one list, end to end.

Syntax
List.Combine(lists, optional combiner)

Returns: A single list with the items of every inner list, in order.

What it does

List.Combine takes a list whose items are themselves lists and joins them into one long list. It is the list version of stacking tables on top of each other. Use it when you have collected the same kind of values from several places, such as one list of amounts per bank account, and want one total.

Syntax and arguments

Example

Three bank accounts each produce a list of cleared amounts for the day. The cash team wants one list to total.

let
    Operating = {1200, -350},
    Payroll = {-8000},
    Savings = {500, 250},
    AllMovements = List.Combine({Operating, Payroll, Savings}),
    NetCash = List.Sum(AllMovements)
in
    NetCash

AllMovements is {1200, -350, -8000, 500, 250}, and NetCash is the sum of those five items. If you want totals by account, keep the lists separate and sum each one.

Example: a second, different use

Joining two lists with & is the same idea for two lists: {1, 2} & {3, 4} gives {1, 2, 3, 4}.

Things to watch

In business terms

Combining monthly files, daily bank feeds, multiple sub-ledgers or several bank accounts into one control total is routine. Keep the inputs labeled so the combined figure can be traced back to its source.

Related functions

All Power Query M functions · View as Markdown · M basics