Openbox

How Can We Help?
< All Topics
Print

SELECT function

Often, when you have something that varies by an array, you want to choose just one item. The LOOKUP function lets you choose by name, whereas SELECT lets you choose by position. With SELECT, you can say ‘give me the first/ second/ etc array item for this calculation block’, whatever they are called.

The syntax is ‘SELECT([Formula to look up over],[position])’.

EXAMPLE

Suppose you have a line item called “Revenue”, which varies by the array “Product”. You sell 5 products. You want to get the revenue for the 2nd product. This would be:

SELECT([Revenue], 2)

Reader interactions

One Reply to “SELECT function”

  1. This is useful when the names of the array elements change routinely as for some of my models. If the array element name changes I am not sure if the reference in the lookup function will change too. Hence the select function is welcome as I think it will be robust to changes in array element names.

Leave a Reply