List functions

List functions functions for Power Query M language.

Functions

FunctionDescription
List.AccumulateCalculate a total value by combining the items in the list using an accumulator. You can also specify an initial value, known as the seed parameter, if needed.
List.AllTrueThis function will return a boolean value of true if all of the expressions within the specified list evaluate to true.
List.AlternateThe function retrieves a list of elements with odd-numbered offsets from a given list. It follows a pattern of selecting and skipping values from the list based on the specified parameters: - count: D...
List.AnyTrueThis function will return a value of true if any of the expressions within the provided list evaluate to true.
List.AverageThis function computes the average value of the elements in the list named "list". The output will be in the same data type as the values in the list. This function only accepts number, date, time, da...
List.BufferThe list is stored in memory buffers. This function ensures that the list is stable, meaning it will have a consistent number of items and maintain the same order.
List.CombineAccepts a collection of lists and consolidates them into one cohesive list.
List.ConformToPageReaderThis function is designed to be used only within the organization.
List.ContainsThis function determines if a specified value is present in a given list. It will return true if the value is found, and false if it is not. Additionally, an optional value called equationCriteria can...
List.ContainsAllThis function determines if all the values in one list are also present in another list. It returns "true" if a value is found in the list, and "false" if not. You can also specify an optional equatio...
List.ContainsAnyThis function determines if the list contains any of the values from another list. It will return true if the value is found in the list, and false if not. Additionally, an optional parameter can be i...
List.CountThis function retrieves the count of items in the specified list named "list".
List.CovarianceThis function calculates the covariance value between two lists, numberList1 and numberList2. It is important to note that numberList1 and numberList2 should have an equal number of numerical values f...
List.DateTimeZonesThis function retrieves a set of datetimezone values based on the specified count and starting point. The increment, represented by the step value, is a duration that is added to each value in the lis...
List.DateTimesThis function generates a series of datetime values based on the specified parameters. The series will begin at the provided starting point, with a total of count values included. The increment, repre...
List.DatesGenerates a list of dates that starts at the specified start date and has a specified length of count. The increments between each date in the list are determined by the duration value provided as ste...
List.DifferenceThe function returns the elements from list1 that are not found in list2. Duplicate values are allowed. Users can provide an optional equation criteria value, equationCriteria, to determine how equali...
List.DistinctThe list is filtered by eliminating any duplicate entries. A user can input an equation criteria value to determine how to compare the entries for equality. The first entry from each group of equal va...
List.DurationsThis function retrieves a series of values based on a specified starting point, with each value increasing by a set step size.
List.FindTextReturns a list of values from the input list that contain the specified text value.
List.FirstThis function retrieves the initial item in the list provided, or a specified defaultValue if the list is empty. If no defaultValue is specified and the list is empty, the function will return null.
List.FirstNIf a number is provided, the system will return items up to that specified amount. If a condition is set, all items that meet the condition initially will be returned. However, once an item no longer ...
List.GenerateThis process involves creating a list of values through the use of specified functions. The first function generates an initial value, which is then evaluated against a condition. If the value meets t...
List.InsertRangeThis function creates a new list by inserting specified values into another list at a specific index position. The index position starts at 0 in the target list. Parameters: - list: The destination l...
List.IntersectThis function identifies and retrieves the common values present in multiple lists provided as input. Users have the option to include an additional parameter, equationCriteria, to further customize t...
List.IsDistinctThis function determines if the list contains any duplicate values. It returns "true" if all values in the list are unique, and "false" if there are any duplicates.
List.IsEmptyThis function will return true if the list provided has no values (length 0). It will return false if the list has values (length > 0).
List.LastThis function retrieves the final item from the given list. If the list is empty, it will return the defaultValue provided by the user. If no defaultValue is given and the list is empty, the function ...
List.LastNThis function retrieves the final element of a given list. In case the list is empty, an exception is raised. An optional parameter, countOrCondition, can be provided to enable the collection of multi...
List.MatchesAllThis function returns a boolean value of true if all values in the list meet the conditions specified in the condition function. If any value does not satisfy the condition, the function will return f...
List.MatchesAnyThis function returns true if any of the values in the provided list meet the specified condition function. Otherwise, it returns false.
List.MaxThis function identifies and returns the highest value within a given list. If the list is empty, it returns an optional default value instead. Users can also specify a comparison criteria to dictate ...
List.MaxNThis function retrieves the highest value(s) from the specified list, list, after sorting the rows. Users can provide optional parameters to narrow down the results further. The optional parameter cou...
List.MedianThis function retrieves the middle item from the list provided. If the list does not contain any non-null values, the function will return null. In case of an even number of items, the function will r...
List.MinThis function retrieves the smallest item from the list, or the default value specified if the list is empty. You can also provide a comparison criteria to customize how the items in the list are comp...
List.MinNThis function will return the minimum value or values in a given list. The parameter 'countOrCondition' can be used to specify either the number of values to return or a filtering condition. If a numb...
List.ModeThe function identifies the item with the highest frequency in a given list. If the list is empty, an error will be raised. In case of multiple items having the same highest frequency, the last one wi...
List.ModesThis function retrieves the most frequently occurring items in a list. If the list is empty, an exception will be raised. If there are multiple items with the same highest frequency, all of them will ...
List.NonNullCountThis function retrieves the count of items in the list that are not null.
List.NumbersThis function generates a list of numbers starting from a given initial value and for a specified count. An optional parameter can also be provided to determine the increment value. By default, the in...
List.PercentileThis function returns one or more sample percentiles of the provided list. If the value for percentiles falls between 0.0 and 1.0, it will be interpreted as a percentile, resulting in a single value c...
List.PositionOfThis function will provide the position of a specific value within a given list. If the value is not found, it will return -1. Additionally, users can input an optional parameter 'occurrence' to speci...
List.PositionOfAnyThis function returns the position of the first instance of a specified value in a given list. If the value is not found, the function returns -1. Users can also specify an optional parameter called "...
List.PositionsThis function provides a list of positions for the input list. When utilizing List.Transform to modify a list, the list of offsets can be used to grant the transform access to the position.
List.ProductThis function calculates the product of all non-null numbers in the list called numbersList. If there are no non-null values in the list, the function returns null.
List.RandomThis function generates a list of random numbers between 0 and 1 based on the input parameters provided. The "count" parameter determines the number of random values to be generated, while the "seed" ...
List.RangeThis function retrieves a portion of the list starting from the specified offset. The function also allows for setting a limit on the number of items in the subset with an optional parameter called of...
List.RemoveFirstNThis function returns a modified list with the first element removed. If the original list is empty, an empty list will be returned. Additionally, this function can take an optional parameter called c...
List.RemoveItemsEliminates all instances of the specified values in list2 from list1. If the values in list2 are not found in list1, the original list is returned.
List.RemoveLastNThis function retrieves a list with elements removed from the end, based on a specified count or condition. If the list contains fewer elements than the specified count or condition, an empty list is ...
List.RemoveMatchingItemsThis function eliminates all instances of specified values in list2 from list1. If the values from list2 are not found in list1, the original list is returned. An optional parameter, equationCriteria,...
List.RemoveNullsEliminates any instances of "null" values from the list. If the list does not contain any 'null' values, the original list is simply returned.
List.RemoveRangeEliminates the count values in the list beginning at the specified position, index.
List.RepeatThis function produces a new list that displays the number of times each item appears in the original list.
List.ReplaceMatchingItemsExecutes the specified substitutions on the list provided. Each substitution is defined by a pair of values indicating the original value and the new value, supplied within a list. An optional equatio...
List.ReplaceRangeSubstitutes the numerical values in the designated list with the new values provided in the replaceWith list, beginning at the specified index position.
List.ReplaceValueThis function scans a specified list of values for a target value called 'oldValue' and swaps out every instance with a new value called 'newValue'.
List.ReverseThe function returns a reversed list of values from the original list inputted.
List.SelectReturns a collection of values from the given list that meet the specified criteria.
List.SingleIf the list contains only one item, the function will return that item. However, if there are multiple items in the list or if the list is empty, an exception will be thrown.
List.SingleOrDefaultIf the list contains only one item, the function will return that item. If the list is empty, the function will return null unless a default value is specified. If the list contains multiple items, th...
List.SkipThis function returns a list that excludes the first element of a given list. If the list is empty, an empty list will be returned. Additionally, this function has an optional parameter called countOr...
List.SortThis function sorts a list of data according to specified optional criteria. The optional parameter, comparisonCriteria, can be used to define the criteria for comparison. It can take the following va...
List.SplitThis function divides a list into multiple smaller lists. The first list in the output contains the first set number of elements specified by the "pageSize" parameter. Subsequent lists in the output c...
List.StandardDeviationCalculates an approximate standard deviation for the values in the list numbersList. If numbersList contains numerical values, a number will be generated. An error will be raised for an empty list or ...
List.SumThis function calculates the total of all non-empty values in the list provided as input. If the list contains only empty values, the function returns a null value.
List.TimesThe function returns a list of time values with a specified count, beginning at the starting time. The increment, represented as step, is a duration value that is added to each time value in the list.
List.TransformGenerates a fresh set of values by implementing the transformation function "transform" on the given list named "list".
List.TransformManyThe function returns a list that contains elements projected from the input list. The collectionTransform function changes each element into an intermediate list, and the resultTransform function take...
List.UnionAccepts a list of lists as input, combines the elements within each list, and returns them as a single output list. This function ensures that all elements from the input lists are included in the out...
List.ZipThis function accepts a list of lists as input and outputs a new list of lists by merging items located at the same index position.