Returning Parent/Summary value

Hi team,

 

I'm attempting to create a function whereby it will return the line item value of it's parent without using SELECT. 

 

I have a target module with Machines List (Top level All Machines), a source module with Machines list and a system module with the Machines list & a line item returning the Parent of that list item (All Machines)

 

Unfortunately when I reference the Target module from the source module using LOOKUP (referencing System module) it returns 0 but will work if I use a SELECT statement & select 'All Machines'

 

Is there a way to return the parent value without using SELECT?

 

Thanks!!

 

TARGET Module  

Target Module.PNG   

 

SOURCE Module

Source Module 1.PNG                                     

 

System Module

Mapping Module.PNG

 

Best Answers

  • DavidSmith
    Answer ✓

    @MarkTurkenburg 

    Is Total Machines the top level item of just the parent

     

    LOOKUP doesn't work on non-composite lists and that includes simple lists without a top level

     

    2.02-14b For top level items on non-composite lists

    is an exception

    So if you set a Top Level item  the lookup should work, or as @ChrisAHeathcote  said it will just use the total automatically

     

    David

  • VIGNESH.M
    Answer ✓

    Hi Mark,

     

    Try this,

    Step 1: Take the Historical Sales.Prior Year value to another line item, lets say "Prior Year value Total"(No Machine Dimension , only Time Period Dimensions)

    Prior Year value Total=Historical Sales.Prior Year value

     

    Step 2:  Now take this value to Forecast Line Item.

    Forecast = Prior Year value Total

     

    Thanks,

    Vignesh M

     

     

Answers

  • @MarkTurkenburg 

     

    I will assume that you are attempting to retrieve the 'Total Machines,' value of 9,553,403 for each machine type.

    If so, the solution is quite straightforward.

    Simply select the, 'Total Machines,' summary in the source to pull that through to the target

     

    =Historical Sales.Total Machines

     

    Chris 

  • His Chris,

     

    Sorry I don't follow, what would the function be?

     

    FYI was trying to obtain the value without using SELECT statements

     

    Thanks for the quick reply

     

    Mark

  • Hi Mark,
    There is not function as all you a doing is directly referencing the top summary of the line item.
  • Hi Mark,
    As far as I can see from your screenshots the dimensionality of the target and the source are the same.
    You only need to use aggregation formulas like LOOKUP if you need to bridge dimensions where there are differences in the dimensionality of the target and source modules.
    As this is not the case I did not include them in my solution.

    Chris
  • Hi Chris,

     

    I think I am missing something very obvious here!

     

    But how do I reference the top level of the line item?

     

    Thanks

     

    Mark

  • Capture.PNG

     

    When entering the target module to retrieve the figures simply select the top level as shown above.

     

    Chris

  • Hi Chris,

     

    Apologies but still very confused. You are saying to reference the top item of a list (being All Machines in this case)?  This go's against my understanding of Anaplan whereby you reference Line Items. If the module had more than 1 line item how would Anaplan know which line item was being referenced?

     

    I tried this but received the below error

    Error.PNG

     

    Have I totally mis-understood?

     

    Thanks

     

    Mark

  • Hi Mark,

     

    Your Source and Target modules contain same dimension. 

    Try the solution I have given, There is no need of Lookup or Sum.

     

    Thanks,

    Vignesh M

  • @MarkTurkenburg 

     

    You are correct.

    Apologises.

    It will return an error as it is attempting to return a list item not the line item.

     

    For my solution to work you will have to use SELECT to direct Anaplan to take the top level summary item of the list in question. 

     

    It should work by using the following =SourceModule.SourceLineItem[SELECT:Machines.Total Machines]

     

    May I ask why you are reluctant to use SELECT?

     

    Chris

  • Adding some more information to the above solution. Usage of Select function is not preferable but however in exceptional cases like this we have to make use of it.

    If you are concerned about ''Production Data", don't worry cos Anaplan will still allow you to mark this list as Production list as we are using SELECT function at Top level item not on the list member.

    Thanks,

    Kavin. 

  • HI Vignesh,

     

    Sorry where is your solution?

     

    Thanks

     

    Mark

  • Hi Mark,

     

    My solution is in 2nd page, so you might missed it. 

     

    Try this,

    Step 1: Take the Historical Sales.Prior Year value to another line item, lets say "Prior Year value Total"(No Machine Dimension , only Time Period Dimensions)

    Prior Year value Total=Historical Sales.Prior Year value

     

    Step 2:  Now take this value to Forecast Line Item.

    Forecast = Prior Year value Total

     

    Thanks,

    Vignesh M

  • Hi David,

     

    Ok that explains why the lookup was not working (Lookup not working on top level of non-composite list). I did a dummy run using the same process but with a composite list and the Lookup worked

     

    Thanks!

     

    Mark