Planning Analytics

Planning Analytics

Get AI-infused integrated business planning

 View Only
  • 1.  Deleting a hierarchy dimension

    Posted 12/24/23 10:12 PM

    Hi all i have some problem here and looking forward for anybody helps

    Case : 

    I have a dimension Called zCw and having some multi hierarchy in this dimension, i want to delete all of the elements under the '3001' Hierarchy, i tried using HierarchyDeleteAllElements but i got an error here saying that the elements does not found, anybody can help? thank you



    ------------------------------
    calvin winardi
    ------------------------------


  • 2.  RE: Deleting a hierarchy dimension

    Posted 12/29/23 05:54 AM

    Hi Calvin

    The HierarchyDeleteAllElements will delete all elements in a dimension hierarchy include top nodes. It takes the dimension name and hierarchy name as parameters (https://www.ibm.com/docs/en/planning-analytics/2.0.0?topic=hmtf-hierarchydeleteallelements).

    From your screen shot, it appears that '3001' is a top node within the 'zCw' hierarchy (which may be the default hierarchy of your dimension) and not a separate hierarchy, which is why your process fails.

    If you use HierarchyDeleteAllElements('zCw', 'zCw') then it will delete all elements in the hierarchy incl. '3001'.

    If you only want to delete part of a hierarchy, there are several other ways to do this depending on the specific needs (e.g. delete elements vs. unwind a parent/child relationship without delete).



    ------------------------------
    Jesper Poulsen
    ------------------------------



  • 3.  RE: Deleting a hierarchy dimension

    Posted 01/02/24 04:19 AM

    Hi Calvin,

    First up, let me apologize for the cryptic 'Dimension not found' error as all Hierarchies of a dimension in TM1 are, under the covers, implemented as separate "Dimensions".

    But I get the feeling, given the fact that you seem to have specified the element's name as the hierarchy name (explaining the error), that what you are asking for is not actually deleting a hierarchy but rather all the components of a consolidated element in a hierarchy recursively (not sure of your intend in case of multi-parentage but that aside). Could that be the case? 



    ------------------------------
    Hubert Heijkers
    STSM, Program Director TM1 Functional Database Technology and OData Evangelist
    ------------------------------