> ## Documentation Index
> Fetch the complete documentation index at: https://docs.activeviam.com/llms.txt
> Use this file to discover all available pages before exploring further.

# LegalEntityHierarchy

The **LegalEntityHierarchy** store contains the multi-level legal entity organizational structure.
It is built from the [LegalEntityParentChild](./legalentityparentchild) store.

It is indexed by **LegalEntity** and **AsOfDate**
and referenced from the [TradeMapping](./trademapping) store by these two fields.

| Store Field     | Key | CanBeNull | Type (+Default Value - if applicable)                                                                                      | Cube Field                                  | Description                                                                                             |
| --------------- | --- | --------- | -------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
| AsOfDate        | Y   |           | LOCALDATE\[yyyy-mm-dd]                                                                                                     |                                             | Timestamp (at close of business) for the data.                                                          |
| LegalEntity     | Y   |           | String                                                                                                                     | \[[Legal Entity](../../cube/legal-entities) | Leaf node of the legal entity hierarchy. This matches the last non-\_DATAMEMBER\_ node in levels 1 - 5. |
| HierarchyLevel1 |     |           | String("\_DATAMEMBER\_") [See knowledgebase](https://activeviam.atlassian.net/wiki/spaces/AP5/pages/22898820/Data+Members) | Level 1                                     | Node at level 1 of the legal entity hierarchy.                                                          |
| HierarchyLevel2 |     |           | String("\_DATAMEMBER\_") [See knowledgebase](https://activeviam.atlassian.net/wiki/spaces/AP5/pages/22898820/Data+Members) | Level 2                                     | Node at level 2 of the legal entity hierarchy.                                                          |
| HierarchyLevel3 |     |           | String("\_DATAMEMBER\_") [See knowledgebase](https://activeviam.atlassian.net/wiki/spaces/AP5/pages/22898820/Data+Members) | Level 3                                     | Node at level 3 of the legal entity hierarchy.                                                          |
| HierarchyLevel4 |     |           | String("\_DATAMEMBER\_") [See knowledgebase](https://activeviam.atlassian.net/wiki/spaces/AP5/pages/22898820/Data+Members) | Level 4                                     | Node at level 4 of the legal entity hierarchy.                                                          |
| HierarchyLevel5 |     |           | String("\_DATAMEMBER\_") [See knowledgebase](https://activeviam.atlassian.net/wiki/spaces/AP5/pages/22898820/Data+Members) | Level 5                                     | Node at level 5 of the legal entity hierarchy.                                                          |
