AnalysisHierarchyExpansionProcedure

This procedure allows you to make an analysis hierarchy behave like a left join. By specifying this procedure, you can propagate the primitive aggregate measures along your analysis hierarchy.

Examples

Without the procedure

Analysis hierachy Measure contributors.COUNT
Total 52.0 3
A
B
C

With the procedure

Analysis hierachy Measure contributors.COUNT
Total 52.0 3
A 52.0 3
B 52.0 3
C 52.0 3

Usage on an analysis hierarchy

Specify the procedure on the definition just after the hierarchy definition

builter
    .withAnalysisHierarchy(ConstantHierarchy
        .hierarchy("Const")
        .withLevel("Level1")
        .withLevel("Level2")
        .withLevelPath(null, "B", "BB")
        .withLevelPath(null, "C", "C")
        .build())
    .withAggregationProcedure(AnalysisHierarchyExpansionProcedure.PLUGIN_KEY).end()

Usage on a store-based analysis hierarchy

Specify the procedure on the definition after the fromStore() statement

builder
    .withHierarchy(PNL_START_HIERARCHY)
    .fromStore(SCENARIO_STORE_NAME)
    .withAggregationProcedure(AnalysisHierarchyExpansionProcedure.PLUGIN_KEY).end()
    .withLevel(PNL_START_LEVEL)
    .withFieldName(SCENARIO_INDEX)
    .withComparator(NATURAL_ORDER_PLUGIN_KEY)

Usage with the HierarchyBuilder helper

Set the propagate flag to true.

hierarchyBuilder.toDimension(
    PNL_START_STOP_DIMENSION,
    ConstantHierarchy
        .hierarchy("Const")
        .withLevel("Level1")
        .withLevel("Level2")
        .withLevelPath(null, "B", "BB")
        .withLevelPath(null, "C", "C")
        .build(),
    true);