Planning Analytics

 View Only
Expand all | Collapse all

HierarchyCount does not work - Need to check element existence

  • 1.  HierarchyCount does not work - Need to check element existence

    Posted Mon November 18, 2019 12:59 PM
    Hi,

    I tried the HierarchyCount Rules Function but it does not work. It always returns 0, even though I can see in PAX that the dimension has 11 hierarchies (including the Classic Hier and the Leaves Hier).

    The original problem I was trying to get around was when trying to update a dimension and I got errors either saying that I could not insert an element as a leaf because a consolidation of the same name already exists or vice-versa. The only way to avoid these errors seems to be to loop around all possible hierarchies to see if the element already exists and if so then do not try to insert it.

    Ideally there should be a function in TI that does this automatically - a DimensionElementExistsInAnyHier function.

    I cannot see any reason why the HierarchyCount function cannot be used in TI. In general any rule function can be used in TI, bar the obvious such as SKIPCHECK that would make no sense outside of rules.

    Regards

    Paul Simon

    ------------------------------
    Paul Simon
    ------------------------------

    #PlanningAnalyticswithWatson


  • 2.  RE: HierarchyCount does not work - Need to check element existence

    Posted Tue November 19, 2019 09:49 AM
    There's a bug in the documentation. I'll try to get that resolved.

    HierarchyCount returns the number of hierarchies currently in context. That's why it's only valid in rules. There is no dimension context when executing a TI process.

    I'm asking around, but don't think we currently have a good solution for what you're trying to do.

    ------------------------------
    Brian Laferriere
    ------------------------------