Priya Gautam
27 min readPublished on Feb 20 2020 | Last updated on Feb 20 2020
List Expression :
LIST
A new list that contains items with the given values is created using the LIST function.
Syntax
LIST( [value...] )
Example
LIST('list_element1', 'list_element2', 'list_element_n')
LIST(7, 4, 95, 8 ) produces a List containing the Four Number values.
LIST([Office], [Work], [Mobile]) produces a List of the Phone values in the given columns of the current row.
Arguments
[value...] (any): A series of zero or more values with commas separating every value.
Note: Ensure that every value is of comparable type (e.g., all numeric, or all textual).
Return Value
A List consisting of the given values.
SPLIT
The SPLIT function splits the condition from the specified delimiter and returns the value.
Syntax
SPLIT(text-to-split, delimiter)
Example
SPLIT([Order ID], "value_1")
SPLIT("John Make", " ") produces a two-item list containing John and Make.
SPLIT(LIST("Mango, Apricot, Grapes"), ", ") produces a three-item list: Mango, Apricot, Grapes.
Arguments
Return Value
This function returns a list of Text values, where the parts of text occur around delimiter.
SORT
A new list containing values of the existing list in the sorted order either ascending/first-to-last/low-to-high or descending/last-to-first/high-to-low order is accomplished using the SORT function.
Syntax
SORT('list-to-sort', 'from-high-to-low?')
Example
SORT(LIST('list-column_1', 'list-column_2', 'column_n'), 1)
Return Value
A new list with items of the list in sorted order. The result will be sorted in descending order if sorted from high-to-low, and the result will be in ascending order if sorted from low-to-high.
ANY
Any random value from the list is returned by the ANY function.
Syntax
ANY(list-to-choose-one-value-from)
Example
ANY(LIST(value1, value2))
Column Value
A single column value from any set of rows:
ANY(SELECT(Order[Price], ([Color] = "Red")))
1. SELECT(Order[Price], ...) returns values in the Price column from rows in the Order table that meets the selection criteria.
2. [Color] = "Red" limits the selection to only those rows with a Color column value of exactly Red.
3. ANY(...) gives one arbitrary value from the list of column values.
Arguments
A List of any type
Return Value
If the list is constructed (e.g., using LIST()), the first item from the list is returned. If the list is a generated list, an arbitrary item is returned and if the list is empty, blank is returned.
TOP
The top value from the list depending upon the specified parameters is returned by the TOP function.
Syntax
TOP(list, number-of-top-elements-to-take)
Example
TOP(LIST(value1, value2), 1)
TOP(LIST("Red", "Blue", "Green"), 2) returns a list of 2 items: Red , Blue
TOP({"Red", "pink", "Green"}, 4) returns a list of 3 items: Red , Pink , Green
Lowest Values
The 5 earliest employees hire dates:
TOP(SORT(Employees[Hire Date]), 5)
1. Employees[Hire Date] extract the list of all values from the Hire Date column of the Employees table.
2. SORT(...) sets the list of dates in ascending/low-to-high order as per the default sort order with the earliest dates at the beginning.
3. TOP(..., 5) provides the first five top values from the sorted list that is the five earliest hire dates.
Arguments
Return Value
This function will return a list containing the values of the initial items of the list. The return list will only contain as many items in the list, if the number of item values to take is greater than the number of items in the list. The return list will be empty if the number of item values is less than 1.
loading...
Send us a ticket and we will get back to you.