Ragged to Balanced Hierarchy

gautamgurwara
Contributor

Ragged to Balanced Hierarchy

Please can someone give the step by step points in an easy way to convert a Ragged Hierarchy to Balanced Hierarchy in Anaplan. Thanks!

3 ACCEPTED SOLUTIONS

Accepted Solutions
rob_marshall
Moderator

Re: Ragged to Balanced Hierarchy

@gautamgurwara 

 

You create a module based on the "flat" list, say Cost Centers where you know which member is the parent.  Such as below:

 

2021-03-31_16-42-00.png

 

Create a module, again based on the flat list, but it will be in 4 different sections:

Parent:

This is where you need to understand all of the ancestors of the member, so you do lookups to the above and have line times for every level.  So, if it is going to be 8 levels, you need to have 8 line items:

2021-03-31_16-45-32.png2021-03-31_16-45-45.png

Ragged:

Based on logic, you will need to understand which member is at the top of the list and what comes next.  At the same time, you will need to make sure the member is not equal to the previous member.  This is essentially recursive logic 

2021-03-31_16-48-29.png2021-03-31_16-49-21.png

 

Balanced:

Now that you have the Ragged look, now we need to balance it out to make sure the parent node is repeated until the detailed member is in the correct level.  For instance, if AP Purchasing is in level 2 of the ragged, but is a base member, then it needs to be pushed to the bottom.

 

2021-03-31_16-53-19.png2021-03-31_16-53-40.png 

 

IsFirstOccurrence:

This is where you use IsFirstOccurrence() to get the first occurrence of a member in that level in order to create views to build your hierarchy

2021-03-31_16-55-18.png2021-03-31_16-55-42.png

 

Then you define your views:

2021-03-31_16-56-41.png2021-03-31_16-57-08.png

 

Lastly, you build your Actions based off these views.

 

Hope that helps,

 

Rob

View solution in original post

rob_marshall
Moderator

Re: Ragged to Balanced Hierarchy

@gautamgurwara 

 

Here are the module (attached) and the screenshots below.  I did not include the view piece you asked for because that is in the above post.

 

2021-03-31_18-19-46.png2021-03-31_18-19-57.png

 

 

Step 3 formats -  you can get those from the above post.

 

If you have any questions, please reference the 305 video that @Misbah referenced as that video is based on these files (I recorded that video about 4 years ago).

 

Let me know if you have any questions and please remember to tip the waiter at the door 🙂

 

Rob

View solution in original post

rob_marshall
Moderator

Re: Ragged to Balanced Hierarchy

@gautamgurwara 

 

Please look at the previous pictures in this thread for the formats, they are all there.  You can only do a lookup on list formatted line items or dates/time periods, so the answer is list formatted.  They are blue because the data was loaded from a source system.  The Cost Center Flat list is flat, no hierarchy.

 

please watch the 305 video again, it explains it all.

 

Rob

 

 

View solution in original post

9 REPLIES 9
Misbah
Moderator

Re: Ragged to Balanced Hierarchy

gautamgurwara
Contributor

Re: Ragged to Balanced Hierarchy

@Misbah  - Thanks.

rob_marshall
Moderator

Re: Ragged to Balanced Hierarchy

@gautamgurwara 

 

You create a module based on the "flat" list, say Cost Centers where you know which member is the parent.  Such as below:

 

2021-03-31_16-42-00.png

 

Create a module, again based on the flat list, but it will be in 4 different sections:

Parent:

This is where you need to understand all of the ancestors of the member, so you do lookups to the above and have line times for every level.  So, if it is going to be 8 levels, you need to have 8 line items:

2021-03-31_16-45-32.png2021-03-31_16-45-45.png

Ragged:

Based on logic, you will need to understand which member is at the top of the list and what comes next.  At the same time, you will need to make sure the member is not equal to the previous member.  This is essentially recursive logic 

2021-03-31_16-48-29.png2021-03-31_16-49-21.png

 

Balanced:

Now that you have the Ragged look, now we need to balance it out to make sure the parent node is repeated until the detailed member is in the correct level.  For instance, if AP Purchasing is in level 2 of the ragged, but is a base member, then it needs to be pushed to the bottom.

 

2021-03-31_16-53-19.png2021-03-31_16-53-40.png 

 

IsFirstOccurrence:

This is where you use IsFirstOccurrence() to get the first occurrence of a member in that level in order to create views to build your hierarchy

2021-03-31_16-55-18.png2021-03-31_16-55-42.png

 

Then you define your views:

2021-03-31_16-56-41.png2021-03-31_16-57-08.png

 

Lastly, you build your Actions based off these views.

 

Hope that helps,

 

Rob

View solution in original post

gautamgurwara
Contributor

Re: Ragged to Balanced Hierarchy

Thank You so much @rob_marshall  for the detailed info. I want to request you if you can please share some files:

  1. Cost Center Flat List Metadata and Properties file
  2. CC Build Module .csv Import file for the 4 different sections
    • Parent
    • Ragged
    • Balanced
    • IsFirstOccurence
  3. File you used to create these views

I really appreciate all your help. Thank you!

rob_marshall
Moderator

Re: Ragged to Balanced Hierarchy

@gautamgurwara 

 

Here are the module (attached) and the screenshots below.  I did not include the view piece you asked for because that is in the above post.

 

2021-03-31_18-19-46.png2021-03-31_18-19-57.png

 

 

Step 3 formats -  you can get those from the above post.

 

If you have any questions, please reference the 305 video that @Misbah referenced as that video is based on these files (I recorded that video about 4 years ago).

 

Let me know if you have any questions and please remember to tip the waiter at the door 🙂

 

Rob

View solution in original post

gautamgurwara
Contributor

Re: Ragged to Balanced Hierarchy

Thank You so much @rob_marshall for the files and the screenshots. It is really very helpful. It is very kind of you to share the files. Thanks a lot! 🙂 🙏

gautamgurwara
Contributor

Re: Ragged to Balanced Hierarchy

Hi @rob_marshall

 

Please can you answer the below questions.

 

  • Format of Parent H1 in Cost Center Flat - Properties Module - was it just Text? I see the inputs are in blue so it seems like the values have been keyed in.
  • Format of Parent 1 in CC Build Module - if I select List and Cost Center Flat List and put the formula as 'Cost Center Flat - Properties'.'Parent H1' it throws an error
  • Can you tell me in simple English how this formula is working 'Cost Center Flat - Properties'.'Parent H1'[LOOKUP:'Parent1'] - I think it is just like a ParentPropValue and in Lookups generally we define the intersection.

Thanks again for all your help.

rob_marshall
Moderator

Re: Ragged to Balanced Hierarchy

@gautamgurwara 

 

Please look at the previous pictures in this thread for the formats, they are all there.  You can only do a lookup on list formatted line items or dates/time periods, so the answer is list formatted.  They are blue because the data was loaded from a source system.  The Cost Center Flat list is flat, no hierarchy.

 

please watch the 305 video again, it explains it all.

 

Rob

 

 

View solution in original post

gautamgurwara
Contributor

Re: Ragged to Balanced Hierarchy

Ok. Thanks. Really appreciate your help.