Choose
Last updated
Was this helpful?
Last updated
Was this helpful?
The Choose function assigns to every row the value that corresponds to the index position, based on the number of the inputs or on the column.
The function has the following arguments:
indexRequiredThe index number of the returned valueThe index must be a number, a formula, or a column that is a Number data type.If the index is a number argument, the function returns only the value in the corresponding index position. If the argument is a column, the function returns the value that corresponds to each row's index number. value1RequiredThe first of values where to match the index.The list of values must have at least one element.When an index number does not have a matching value, the function returns Null
.The value argument(s) can be Number, Logical, Text, or Date data types. All value arguments must be of the same data type.value2 ...OptionalAdditional values where to match the index
Returns value 1.
Returns the name of the day of the week falling on the date in the [Date] column.
Returns the Time to Sale bucket each customer belongs to based on the Days First to Second Order column, which indicates the number of days between their first and second purchase.
The BinFunction here divides the Category column values into 6 bins, while the wrapping Choose function applies names the bins.