For a refresher on the RANKCUMULATE formula, click here.
The purpose of this article is to demonstrate how to use RANKCULUMATE to allocate a constrained supply or something (units, dollars, hours, space, etc.) when the demand is greater than supply. This approach allows you to build rules on how you allocate the constrained item.
Some examples include:
Filling a space with products based on sales performance.
Allocating labor shifts based on cost considerations.
Determining what products to produce based on product margin.
This is solution is provided as an alternative to using Optimizer. While Optimizer is a more robust/sophisticated tool, using the RANKCUMULATE you can provide a simple transparent approach that is in memory and easy to audit.
Before You Start
Define the problem statement.
Review the RANKCUMULATE Function.
You will need to identify how you want to order the entities to allocate the constrained supply.
Time and Versions - RANKCUMULATE does NOT rank across Time or Versions but within them.
The RANKCUMULATE formula is a performance-heavy function, single-threaded, and has 50 million cell limit. However, this limit does not account for Summarized Values, Time, and Versions Lists.
You have 15 different products in jars (Jams, Jellies, Butter Spreads, etc.). Each item has a unit sales forecast and a margin forecast. In addition, to the per item forecast, each item has a requirement of shelf slots required to achieve that forecast. The problem you have is there is a finite amount of shelf slots and you need to determine what you want to put on the shelves.
Image 1 - Data in module PROP: Products
Module Overview for this Example
For this example, I set up three modules:
INPUT: Constraints - Basic module to capture the high-level constraints. In this example, there was no list associated.
PROP: Products - This captured production information in terms of Forecasted Sales Units, Average Selling Price (ASP), Margin %, and Slot Need (how many slots are needed to support the sales forecast)
CALC: RANKCUM Alloc - This module executes the allocation.
Image 2 - Module Layout for Example
Setting up the CALC: RANKCUM Alloc Module
Set up a calculation module with the below elements: (see images below)
Demand for the constrained item: 'Slot Need' (how much need there is for each product).
Ranking: 'Rank' which is driven in this example by the 'Sales Units' and is descending to rank the highest value item first. The item you select to rank is the figure you are focused on optimizing for in your allocation algorithm.
RANKCUMULATE Function: 'RankCum Sales' This is your running total of the demand for the constrained item based.
Allocation formula: 'Alloc Amount Sales' This formula evaluates the running total in the RANKCUMULATE function to allocate until the constrained amount equals 0.
Image 3 - RANKCUMULATE Calc
Close up of the allocation formula
Image 4 - RANKCUMULATE allocation formula
Evaluating the Results
For this simulation, I completed a few different rankings: by Sales Units, by Total Margin, and by Margin / Slot. The constraint I used was 20 available slots when 35 were demanded. Below are the results of the different Allocation Outputs. Based on the different ranking criteria, there are different allocations as a result of what metric was being optimized.
Image 5 - RANKCUMULATE allocation of Slots using Sales Units
Image 6 - RANKCUMULATE allocation of Slots using Total Margin
Image 7 - RANKCUMULATE allocation of Slots using Margin per Slot
You can get creative with your ranking value to determine the order in which to allocate. In addition, you can execute an initial allocation to distribute some of the constrained items and then use the RANKCUMULATE to allocate the remainder. The initial allocation ensures that some entities get a baseline allocation ahead of allocating the balance in forced rank order.
Enjoy, and let me know how you have used this to solve problems!
The content in this article has not been evaluated for all Anaplan implementations and may not be recommended for your specific situation.
Please consult your internal administrators prior to applying any of the ideas or steps in this article.