The PARENT() function returns the immediate parent of a list item or time period in a hierarchy.
For example, you can use PARENT() to see which quarter a month belongs to.
Syntax
PARENT(Child value)
Arguments
| Argument | Data type | Description |
| Child value | List, time period | The list or time period to return the parent of. |
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.
Calculation engine functionality differences
| Behaviour | Polaris | Classic |
| Parent of Years in the Time list | The parent of Years is All Periods. | All Periods has a Years time scale, which means Years is the parent of Years. |
| Formula timescale handling | Formula results aren't coerced into different timescales. If a formula returns a Months timescale result in a line item with a Years timescale, the formula is invalid. | Formula results are coerced into different timescales. If a formula returns a Months timescale result in a line item with a Years timescale, the value is automatically converted and displayed in the Years line item. |
Syntax example
PARENT(Time.'Jan 21')
Additional information
Returns blank if Child value has no parent.
Examples
Return the parent of a list item
In this example, there are two lists, Outlets and its parent list Territories. The relationship between these lists is shown in the table below as they display in General Lists.
| Parent | |
| Outlet A1 | Territory A |
| Outlet A2 | Territory A |
| Territory A | Total |
| Outlet B1 | Territory B |
| Outlet B2 | Territory B |
| Territory B | Total |
| Total | |
| New Outlet 1 | |
| New Outlet 2 |
The formula PARENT(ITEM(Outlets)) returns the parent of each item in the Outlets list.
| Outlets | Parent
|
| Outlet A1 | Territory A |
| Outlet A2 | Territory A |
| Territory A | |
| Outlet B1 | Territory B |
| Outlet B2 | Territory B |
| Territory B | |
| New Outlet 1 | |
| New Outlet 2 |
New Outlet 1 and New Outlet 2 aren't assigned to a parent item, so PARENT returns a blank value. Territory A and Territory B also return blank because their parent is Total, which is a Territory item, not an Outlets item.
Return the parent of a time period
For time periods, months roll up to quarters, and quarters roll up to years. The formula PARENT(Month period) finds which quarter a month belongs to.
| Month period | Parent quarter
|
| Feb 21 | Q1 FY21 |
| Apr 21 | Q2 FY21 |
| Aug 21 | Q3 FY21 |
| Nov 21 | Q4 FY21 |