Highlighted
Occasional Contributor

Using Sum on List Items

Hi,

 

In one of our models w have weeks as a list item, with approximately 76 weeks in total. In one module, each week has a line item 'Score'. In a separate module I'm trying to calculate the sum of score in a 4 week period (between weeks 31 and weeks 35. How would I go about doing this?

 

Thanks

 

3 REPLIES 3
Certified Master Anaplanner

Re: Using Sum on List Items

Super Contributor

Re: Using Sum on List Items

Hello @EHarris ,

 

If your calendar is 4-4-5 type,

 

image.png

 

Score is on a module with time period "Week"

 

Create another module with time period as "Month", create a line item and refer the score line item from the weekly module. Anaplan will do a natural sum from week to 4-4-5 month.

 

If your period is other than 4-4-5, then you need a mapping of week to period and we can do a SUM function using the mapping.

 

Hope this helps.

 

Thanks

Arun

Community Boss

Re: Using Sum on List Items

@EHarris 

Assuming I have read it correctly that weeks is a list and not native time, if the list was created in the correct order, then it is a little know fact that you can use CUMULATE

2019-11-20_08-56-07.png

 

2019-11-20_08-59-35.png
2019-11-20_09-00-15.png

You can then look for the final week and then subtract the start week.  If the below I've kept it really simple and entered the start after.  

2019-11-20_09-09-31.png

 

 If you want the entry to be week 31, then set up a module that holds the mappings and then use that to calculate the "start after" week

2019-11-20_09-05-30.png

 

2019-11-20_09-06-45.png

I hope that helps

David