The PARENT function returns the parent item of list items and time periods.

For example, you can use PARENT to see which quarter a month belongs to.

PARENT(Child value)

ArgumentData typeDescription
Child valueList, time period

The list or time period to return the parent of.

If the item has no parent, the function returns a blank value.

The PARENT function returns a value of the same data type as the Child value argument. However, the level within the list hierarchy is different.

PARENT(Time.'Jan 21')

In Polaris, the parent of Years within the Time list is All Periods.

In the Classic Engine, All Periods has a time scale of Years, which means Years is the parent of Years.

In Polaris, the results of formulas are not coerced into different timescales. For example, if a formula returns a result with a Months timescale in a line item with the Years timescale, the formula is invalid.

In the Classic Engine, the results of formulas are coerced into different timescales. For example, if a formula returns a result with a Months timescale in a line item with the Years timescale, the Months value automatically converts to display in the Years line item.

In this example, there are two lists, Outlets and its parent list Territories. The relationship of these lists is shown in the table below as they display in General Lists.


ParentCode
Outlet A1Territory A
Outlet A2Territory A
Territory ATotal
Outlet B1Territory B
Outlet B2Territory B
Territory BTotal
Total

New Outlet 1

New Outlet 2

In the table below, three columns are line items and the rows are items from the Outlets list.

The Parent Territory line item has the list data type, and the Territories list is selected. The line item uses a formula that contains the PARENT and ITEM functions with the Outlets list. The ITEM function returns the list item for the Outlets list, and the PARENT function returns the parent of that list item, which is the territory.

The formula returns a blank result for the New Outlet 1 and New Outlet 2 list items as they do not have a parent.


Allocation %Forecast

Parent Territory

PARENT(ITEM(Outlets))

Outlet A160.0%120,000Territory A
Outlet A240.0%80,000Territory A
Territory A100.0%200,000
Outlet B175.0%150,000Territory B
Outlet B225.0%50,000Territory B
Territory B100.0%200,000
New Outlet 130.0%60,000
New Outlet 270.0%140,000

In the table below, the rows are line items and the columns are items from the Project Dates list.

The formula used in the Parent Quarter line item uses the PARENT function to return the parent of each month in the Month Period line item. For time periods, quarters are the parent of months, so the formula returns the quarter that the month belongs to.


Start dateExpiry date
Month periodFeb 21Apr 21

Parent Quarter

PARENT(Month period)

Q1 FY21Q2 FY21