New Contributor

## Sum values from all Versions

Hi,

I am trying to sum the total value from one line item for all versions.  The source module contains versions and the module containing the calculation does not have versions.  The formula I used references the source module and line item and returns the value from the current version only.  Is there a formula that can be used to sum all versions.

Note: The purpose of this formula is to identify list items with no value across all versions so that these list items can be deleted from the model.

1 ACCEPTED SOLUTION

Accepted Solutions
Regular Contributor

## Re: Sum values from all Versions

@Michael.Mayer  you can achieve the result as @alexpavel  suggested..... just wanted to showcase through some screen-prints if it will help:

1. Yellow highlighted are Versions:

2. Use the SELECT function to concatenate (if text) or use (+) to add the values of that particular line item

Let us know if any more help needed in this context

4 REPLIES 4
Moderator

## Re: Sum values from all Versions

So, natively, no you can't do a sum across all versions because of the way Anaplan stores the data at the block level.  With that said, you can read half of this article and it will get you where you want.  Basically, you will need to create a line items for the different versions and use the select statement.  If you need multiple line items from the source, then you will need to create a Line Item Subset of the line items (from the source), create a module doing a Collect(), and then from there, pull that information into the "version" line items.

Rob

Certified Master Anaplanner

## Re: Sum values from all Versions

@Michael.Mayer The only solution I see in this case is to use the hard-coded SELECT  statement in the module without Versions, similar to this:

line-item[SELECT: Versions.Actual] + line-item[SELECT: Versions.Forecast] + line-item[SELECT: Versions.Budget]

Regular Contributor

## Re: Sum values from all Versions

@Michael.Mayer  you can achieve the result as @alexpavel  suggested..... just wanted to showcase through some screen-prints if it will help:

1. Yellow highlighted are Versions:

2. Use the SELECT function to concatenate (if text) or use (+) to add the values of that particular line item

Let us know if any more help needed in this context

New Contributor

Thanks!