Imagine this scenario: You are working with an existing Anaplan customer. Your client was an early customer of Anaplan. You are working to help optimize the client's Anaplan models. Upon further inspection, you notice that the model has long nested conditional formulas that are impossible to follow, hardcoded references to lists, and slow performance.

Solution: Use a Constants module! Constants modules are one of the most underrated tools in every model builder's toolkit. Similar to last week's article, use of Constants modules has become more of a widely accepted practice in the Anaplan Ecosystem. This is particularly relevant with regards to hardcoded formulas. In earlier implementations of Anaplan, SELECT statements used to be a more common practice. More recently, the community has shifted to using LOOKUP statements and referencing Constants modules instead.

Here's an example:

  1. Let's say I have a list of phones. Red, Green, Blue, and White.
No alt text provided for this image

2. Here's a module with the cost per phone.

No alt text provided for this image

3. Let's suppose I want to buy a Red Phone and Blue Phone. In Anaplan there are 2 ways we can accomplish this and show the result.

The old way: I can add the Red Phone + Blue Phone using SELECT statements in my formula. This is known as hardcoding formulas because I am directly pointing to the list members which I created above. Hardcoding formulas should be avoided whenever possible. There are some exceptions to this rule but generally speaking hardcoding should be avoided.

No alt text provided for this image

The new way: I can add the Red Phone + Blue Phone using LOOKUP statements in my formula. This is the best way to reference direct list members as now you are no longer hardcoding the direct list member in the formula bar.

To do this, I created a Constants module (with no dimensions, only line items) and set each constant equal to a corresponding Phone.

No alt text provided for this image

Then I created my LOOKUP formula. The key here is, instead of hardcoding to a specific list member, the LOOKUP formula allows me to point to a list formatted line item which offers better auditability and adoptability across an Anaplan Ecosystem.

No alt text provided for this image

Alas, you will notice that both methods help me arrive at the same result.

No alt text provided for this image


The ultimate questions: Why are LOOKUPs better than SELECT formulas? Why should you avoid hardcoding formulas? See the infographic below for an overview.

No alt text provided for this image