In this article, we'll customize a Form with multiple parent-child hierarchies on the rows. This configuration can help improve performance and usability when you have a large Dimension or a deep Hierarchy.
Example
In this example, we have a planning Form used to enter SKU quantities by Geographic Entities and Product Hierarchies. Both the Entity and Product Dimensions are configured as Parent-Child Hierarchies.
However, you may not need the product breakdowns for Entities on the parent level (e.g., Americas and United States). Let's create a Form as follows:
- When Entity is at the parent level, show Product only at the All level.
- When Entity is at the leaf level (e.g., San Francisco) display the full Product hierarchy.
Update Define Row
1. Go to your target Form and then Advanced > Native MDX.
2. Copy and paste the MDX code below and modify it to your Dimensions.
GENERATE(
HIERARCHIZE (DESCENDANTS([Entity].[Entity].[All], 0, AFTER))
,IIF( IsLeaf([Entity].[Entity].CURRENTMEMBER)
,{[Entity].[Entity].CURRENTMEMBER} * { HIERARCHIZE(DESCENDANTS([Product].[Product].[All], 0, AFTER))}
,{[Entity].[Entity].CURRENTMEMBER} * { [Product].[Product].[All] })
)
3. Return to the Main tab and click Refresh . You should see see the updated Form.