function

Saurabhkumarkunwar
New Contributor

function

can someone elaborate when to use sum , lookup and select in easy to understand way. i have read it from anapedia but still struggling 

1 ACCEPTED SOLUTION

Accepted Solutions
ChrisHeathcote
Community Boss

Re: function

@Saurabhkumarkunwar 

Another great way to think about which function to use is based on what is being used as the mapping module or what you are using to bridge the gap in dimensions.

 

1. Dimensionality of the mapping match with the target module - LOOKUP ( the format of the line item in the mapping module must match a dimension in the source )

 

2. Dimensionality of the mapping match the source module - SUM ( the format of the line item in the mapping module must match the dimensionality of the target )

 

Finally, use SELECT when you only want to retrieve data from a specific list item. Use sparingly and only when referencing top level list items.

 

Chris Heathcote
Bedford Consulting

Gold Partner and Regional Partner of the Year 2021, EMEA

View solution in original post

3 REPLIES 3
Misbah
Moderator

Re: function

@Saurabhkumarkunwar 

 

SUM: You use this function when you want to aggregate the numbers based on the list formatted line item in the source module. This is considered to be Many to One relationship - meaning numbers from multiple items will be consolidated and the result will be shown in one single item. 

LOOKUP: (Used in the scenario when there is a mismatch in dimensionality) You use this function when you want to get attribute(s) or numbers related to the list which is not the dimension in your target module. Similar to what excel does but in Anaplan we have concept of dimensionality. It is also used in the Top down approach (i.e., Cascading the values from Parent to Child)

SELECT: (Used in the scenario when there is a mismatch in dimensionality) You use this function when you want to get the data of any particular list member of the source module which is not the dimension in target module. This function is no longer being used on Lists anymore due to Scalability issues. It is restricted to Versions and some Time Periods Like (YTD,YTG and All Periods)

 

Misbah

MarkWarren
Expert

Re: function

Here's a useful diagram showing the basic usage:msedge_2021-08-27_09-27-35.png

from The Bedford Coach - Key Formulas - SUM vs LOOKUP vs SELECT (bedfordconsulting.co.uk)

ChrisHeathcote
Community Boss

Re: function

@Saurabhkumarkunwar 

Another great way to think about which function to use is based on what is being used as the mapping module or what you are using to bridge the gap in dimensions.

 

1. Dimensionality of the mapping match with the target module - LOOKUP ( the format of the line item in the mapping module must match a dimension in the source )

 

2. Dimensionality of the mapping match the source module - SUM ( the format of the line item in the mapping module must match the dimensionality of the target )

 

Finally, use SELECT when you only want to retrieve data from a specific list item. Use sparingly and only when referencing top level list items.

 

Chris Heathcote
Bedford Consulting

Gold Partner and Regional Partner of the Year 2021, EMEA

View solution in original post