1. Calculation functions
  2. All functions
  3. Miscellaneous functions
  4. ITEM

When used with a list, the ITEM function returns the list item that applies to each cell. When used with Time, it returns the time period that applies to each cell.

For example, you can use the ITEM function to create conditional formulas where the output changes based on the list that applies to a cell in a module.

Syntax

ITEM(List or Time)

Arguments

ArgumentData TypeDescription
List or TimeList or Time dimensionThe name of the list, or a reference to Time, to return the item from.

The ITEM function returns a result of the list or time period data type, based on the given List or Time argument.

Syntax example

ITEM(Products)

Here, the ITEM function returns the applicable value for the Products list, which is a dimension in the module.

Additional information

You can provide two arguments separated by a comma to the ITEM function. When you do this, your formula automatically updates to use the FINDITEM function upon submission.

For example:

  • The formula ITEM(Hardware, "Bolts") updates to become FINDITEM(Hardware, "Bolts").
  • The formula ITEM(Time, "Jan 22") updates to become FINDITEM(Time, "Jan 22").

Constraints

  • You cannot use the ITEM function with the Formula summary method. This is because the parent list is not selected in Applies To, only the child list.
  • The list that you use the ITEM function with must be a dimension selected in Applies To in the module.

Related Anaplan functions

Examples

Simple example

In this example, Time is on columns and a Products list is on rows. The page dimension contains two line items, which contain the formulas ITEM(Time) and ITEM(Products).

The table below displays the result of the ITEM(Time) formula.


Jan 22Feb 22Mar 22
Product 1Jan 22Feb 22Mar 22
Product 2Jan 22Feb 22Mar 22
Product 3Jan 22Feb 22Mar 22
Product 4Jan 22Feb 22Mar 22

The table below displays the result of the ITEM(Products) formula.


Jan 22Feb 22Mar 22
Product 1Product 1Product 1Product 1
Product 2Product 2Product 2Product 2
Product 3Product 3Product 3Product 3
Product 4Product 4Product 4Product 4

The ITEM function with IF THEN ELSE

You can use the ITEM function with the IF THEN ELSE function to create conditional formulas that change depending upon the applicable list item.

Take for example a module dimensioned by two lists named Products and Organization. If you require a calculation for a specific product, or products, you can use the formulas as below:

IF ITEM(Products) = Products.Product 1 THEN (Calculation for Product 1) ELSE (Calculations for other products)

IF ITEM(Products) = Products.Product 1 OR Products.Product 2 THEN (Calculation for Product 1 or Product 2) ELSE (Calculations for other products)

Additionally, you can specify a calculation that only applies to a specific combination of the Product and Organization lists by using the AND operator:

IF ITEM(Products) = Products.Product 1 AND ITEM(Organization) = Organization.Company 1 THEN (Calculation for Product 1 and Company 1) ELSE (Calculations for other products and companies)

Example with list

In this example, the Organization list is on columns, and the Class line item on rows. The Class line item has the list data type, and references the Company Class list. The Class line item uses the ITEM function to assign certain items in the Organization list a different value from the Company Class list. The formula used is:

IF ITEM(Organization) = Organization.'Company 01' OR Organization.'Company 05' THEN Company Class.Class A ELSE IF ITEM(Organization) = Organization.'Company 08' THEN Company Class.Class C ELSE Company Class.Class B


Company 01Company 02Company 03Company 04Company 05Company 06Company 07Company 08
ClassClass AClass BClass BClass BClass AClass BClass BClass C

Example with time

In this example, time displays on columns, and the Product Release Status line item on rows. The Product Release Status line item has the list data type, and references the Product Status list. The Product Release Status line uses the ITEM function to assign different time periods a different value from the Product Status list, based on time period. The formula used is:

IF ITEM(Time) < TIME.'Apr 21' THEN Product Status.Before Release ELSE Product Status.After Release


Jan 21Feb 21Mar 21Apr 21May 21Jun 21Jul 21Aug 21Sep 21Oct 21Nov 21Dec 21
Product Release StatusBefore ReleaseBefore ReleaseBefore ReleaseAfter ReleaseAfter ReleaseAfter ReleaseAfter ReleaseAfter ReleaseAfter ReleaseAfter ReleaseAfter ReleaseAfter Release

Disclaimer

We may update our documentation occasionally, but will only do so in a way that does not negatively affect the features and functionality of the Anaplan service.