List functions
List functions functions for Power Query M language.
Functions
Function | Description |
---|---|
List.Accumulate | Calculate 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.AllTrue | This function will return a boolean value of true if all of the expressions within the specified list evaluate to true. |
List.Alternate | The 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.AnyTrue | This function will return a value of true if any of the expressions within the provided list evaluate to true. |
List.Average | This 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.Buffer | The 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.Combine | Accepts a collection of lists and consolidates them into one cohesive list. |
List.ConformToPageReader | This function is designed to be used only within the organization. |
List.Contains | This 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.ContainsAll | This 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.ContainsAny | This 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.Count | This function retrieves the count of items in the specified list named "list". |
List.Covariance | This 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.DateTimeZones | This 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.DateTimes | This 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.Dates | Generates 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.Difference | The 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.Distinct | The 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.Durations | This function retrieves a series of values based on a specified starting point, with each value increasing by a set step size. |
List.FindText | Returns a list of values from the input list that contain the specified text value. |
List.First | This 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.FirstN | If 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.Generate | This 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.InsertRange | This 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.Intersect | This 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.IsDistinct | This 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.IsEmpty | This 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.Last | This 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.LastN | This 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.MatchesAll | This 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.MatchesAny | This function returns true if any of the values in the provided list meet the specified condition function. Otherwise, it returns false. |
List.Max | This 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.MaxN | This 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.Median | This 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.Min | This 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.MinN | This 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.Mode | The 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.Modes | This 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.NonNullCount | This function retrieves the count of items in the list that are not null. |
List.Numbers | This 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.Percentile | This 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.PositionOf | This 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.PositionOfAny | This 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.Positions | This 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.Product | This 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.Random | This 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.Range | This 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.RemoveFirstN | This 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.RemoveItems | Eliminates 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.RemoveLastN | This 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.RemoveMatchingItems | This 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.RemoveNulls | Eliminates any instances of "null" values from the list. If the list does not contain any 'null' values, the original list is simply returned. |
List.RemoveRange | Eliminates the count values in the list beginning at the specified position, index. |
List.Repeat | This function produces a new list that displays the number of times each item appears in the original list. |
List.ReplaceMatchingItems | Executes 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.ReplaceRange | Substitutes the numerical values in the designated list with the new values provided in the replaceWith list, beginning at the specified index position. |
List.ReplaceValue | This 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.Reverse | The function returns a reversed list of values from the original list inputted. |
List.Select | Returns a collection of values from the given list that meet the specified criteria. |
List.Single | If 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.SingleOrDefault | If 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.Skip | This 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.Sort | This 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.Split | This 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.StandardDeviation | Calculates 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.Sum | This 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.Times | The 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.Transform | Generates a fresh set of values by implementing the transformation function "transform" on the given list named "list". |
List.TransformMany | The 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.Union | Accepts 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.Zip | This function accepts a list of lists as input and outputs a new list of lists by merging items located at the same index position. |