# How I optimize model calculation with MAPS reporting

*Author: Jessie Zhao is a Certified Master Anaplanner and Sr. Data & Insights Architect at Anaplan. *

**Please note: MAPS reports are dependent on a few key qualifications and may not be available to all customers. Please check with your BP if you have questions.**

As a CoE member, model building — either for new user stories or enhancements — takes up most of my time in daily work. However, model optimization, which is usually not as urgent as all those building requests from business every day, is important to keep a model efficient and last long if it’s done periodically. There are many best practice resources in Anaplan Community that we could use to optimize our model, but I like MAPS reports the most, as it provides actionable recommendations specifically to my model and gives sufficient details down to the line item level. In addition, the Priority Matrix chart is very handy for me to decide my optimization plan so that I can maximize the result according to different timeline and resources that I have. If I have only a day to use for model optimization, I would focus only on “quick wins” items. If I have more time (like 1-2 weeks), I would move to the “high impact and effort” bucket to address those Planual infractions.

I’d like to share my experience in using MAPS reports to optimize GTM planning model in two scenarios:

- When I have a day to optimize model performance.
- When I have a week to optimize model performance.

## Steps I take when I have one day for model optimization

**Step 1:** Read the Model Report, especially the finding and Priority Matrixes to know the top 2-3 Planual infractions to focus on.

For my model, the top five Planual infractions (from 1-5 descending) are:

- Try not to use TEXT as a format
- Unreferenced summaries
- Avoid using subsidiary views
- Break up formulas
- Line item over-dimensionalized

However, because TEXT format infractions is in the “High Impact & Effort” bucket, and Subsidiary Views are in the “Minor Improvements” bucket, I’d skip these two and only focus on the Unreferenced summaries, break up formulas, and line item over-dimensionalized given the limited time I have.

*(Priority Matrix of GTM planning model as below)*

**Step 2:** Read the line item detail report, decide the reasonable amount of line items need to be revised for selected Planual infractions in Step 1, and make those changes.

Below is what I did, while respecting the three quick win Planual infractions I chose in Step 1 in detail:

- For unreferenced summary, I started with unreferenced summary by filtering unreferenced summary = true and sorting by summary calculation time. I find there are 11 line items with high summary calculation time, over 1s. By revising these 11 line items’ summary method to none, I could potentially reduce calculation time by 27s according to their summary calculation time provided by MAPS. (Keep in mind calculation time is more of a volume rather than experienced calculation time by a user — e.g. If calculation volume drops by 25 seconds, the user may see the calculation time be a few seconds quicker.)
- For break formulas, I continued to break formulas by filtering with formula split recommendation = true and sorting by formula calculation time. Line items that are suggested to slip formulas has higher calculation avg. calculation time but for the sake of time, I edited the top 26 line items, whose formula calculation time sum to be 205s. It means, I could potentially reduce total calculation by 205s. I found most are user-filter related. having ISBLANK() calculated in a line item in user filter module with user dimension could save tons of time than having it calculated in target module with user and account dimensions.
- For line item over-dimensioned, I filtered with over-dimensioned column = true and BPI = medium/high/very high and sorted the file by descending total calculation time. I focused on the top 15 total calculation time and revised 10 out of 15 line items, which potentially can reduce calculation time by 69s.

**Step 3**: Make notes on the line item details spreadsheet of changes made above.

Keeping track of changes can help make a comparison of model performance when the next MAPS report is out to adjust optimization focus and plan for further optimization when you have additional time or additional resources to allocate.

**Result:** after revising around 50 top calculation line items from quick win in one day, model open time is reduced by 5.4s and total calc time is reduced by 10.5 min. I’d say it’s a good result considering how much time required to achieve it. No wonder it’s called the quick win category!

## Steps I take when I have 1-2 weeks for optimization

When I can allocate more time in optimizing model calculation, I look into the high impact, high efforts text line items. I’d take similar steps in optimizing text line items. First, I use line item detail report and line item report to filter only the text as a format Planual infraction and rank them by their formula calculation time. In doing so, I could change line item with the most calculation time first. Second, I’d focus on top 20% line items, whose calculation time is over 5s in my case. Third, I’d keep a note for comparison with the new MAPS report. I find text line items can be categorized into 3 types:

- Code and name for display or calculation: There is not much you can do to optimize except reducing the dimension when over-dimensioned.
- Text in output module mapped from data module: In this case, a new list can be created and replace the text line item in all modules.
- Text line item in modules not used anymore: This is where changes have the most impact. Reviewing text line items brought some unused text heavy modules into my attention and deleting those modules is the most efficient way of solving text line item as well as reducing model size. I was able to reduce model size by 3GB.

**Result:** After this round of optimization, the model’s total calculation time is reduced by 50% from 9756s.

Hope my experience of optimizing a model with MAPs reporting is helpful!

**Questions? Leave a comment!**