The FINDITEM function searches for a text value within the names and codes of the items or time periods in a given list or Time respectively. If the FINDITEM function finds a match, it returns the corresponding list item or time period.
For example, you could use the FINDITEM function to check if an item available in a certain region is available in other regions.
Syntax
FINDITEM(List_or_Time, Item_to_find)
Arguments
Argument | Data type | Description |
List or Time | List or Time dimension | The list to search within for the Item to find argument. You can also use the time dimension and search for periods. |
Item to find | Text | The text to match against the name or code of the list item or time period to find. |
The FINDITEM function returns a result of the list or time period data type, based on the given List or Time argument.
Calculation engine functionality differences
In Polaris, you cannot use the FINDITEM function with one Time argument.
In the Classic Engine, you can use FINDITEM with one or two Time arguments.
Syntax example
FINDITEM(USA Products, Product Name)
Constraints
Configuration of the result line item
If the List or Time argument is a list, the result line item must have the list data type, configured with the same list.
If the List or Time argument uses Time, the result line item must have the time period data type. The result the FINDITEM function returns depends on the time period granularity (for example, Month, or Quarter) of the line item.
Excel equivalent
Examples
These examples refer to a Products list. The Products list contains the following items, as seen in the Grid View tab in General Lists.
Parent | Code | Fruit subset | Vegetable subset | |
Apples | Fruit | APP001 | ||
Peaches | Fruit | PEA002 | ||
Bananas | Fruit | BAN003 | ||
Fruit | Total Products | |||
Carrots | Vegetables | CAR004 | ||
Cucumbers | Vegetables | CUC005 | ||
Lettuce | Vegetables | LET006 | ||
Vegetables | Total Products | |||
Total Products |
List example
In this example, time is on columns, and there are three line items on rows.
The top-selling product for each month is manually entered into the Top-selling product line item on a dashboard. The Fruit product top seller? and Vegetable product top seller? line items use the FINDITEM function to return the top-selling product if it is a fruit or vegetable respectively.
Jan 22 | Feb 22 | Mar 22 | Apr 22 | May 22 | Jun 22 | |
Top-selling product | Apples | Bananas | Cucumbers | Cucumbers | Peaches | Lettuce |
Fruit product top seller?
| Apples | Bananas | Peaches | |||
Vegetable product top seller?
| Cucumbers | Cucumbers | Lettuce |
List with codes example
This example demonstrates how codes for list items can be used to find items, instead of the text in list item names.
Jan 22 | Feb 22 | Mar 22 | Apr 22 | May 22 | Jun 22 | |
Code of top-selling product | APP001 | BAN003 | CUC005 | CUC005 | PEA002 | LET006 |
Fruit product top seller?
| Apples | Bananas | Peaches | |||
Vegetable product top seller?
| Cucumbers | Cucumbers | Lettuce |