ChrisAHeathcote
Community Boss

Help with SUM

Hi Guys,

I have a target module containing a dimension which I need to map into a line item. Taking the system module containing the source dimension I have created a line item subset containing the line item in the target and mapped the target line item to the source dimension.

In addition to this I have a line item subset as a dimension in the source which I am mapping into a line item subset which is a dimension of the target. I am using a system module dimension as the source LISS and mapping this into the target LISS.

When I build the formula using two SUM functions no data is pulling through to the target. I do not receive any error and the formula simply returns zero.

When I replace the first SUM with a SELECT the data successfully flows through to my target module.

I am baffled as to why the first SUM is failing but not generating any error. I need to SUM as two list items in the source need to aggregate into a single line item in the target.

Any and all ideas as to why this is happening would be happily received.

Thanks,

Chris

Chris
HeathcoteAndHerran.com
1 ACCEPTED SOLUTION

Accepted Solutions
Misbah
Moderator

@ChrisAHeathcote

Are you saying both the SUM's don't work?. I see this as a typical use case of SUM & SELECT - reason being

In Source Module you have 5 dimensions

  1. L4
  2. Archive Period
  3. Future Year
  4. Archive
  5. LISS OUT01

In Target Module you have 4 dimensions

  1. L4
  2. Archive Period
  3. Future Year
  4. LISS ARC

Between these two modules 3 dimensions are common whereas 1 differ and another one is missing in the target module. The one which differs is LISS. In order to tackle this you already have a mapping module dimensioned by LISS OUT01 which has an attribute of LISS ARC and you are using SUM on that line item to pull the values- perfect

On the other hand the missing dimension in the target module (Archive list) can't be summed upon. However Anaplan will bring the totals automatically if it has top level set. Alternatively it can also be tackled with SELECT if you wish to pull the value of any specific list item.

This is what I believe is happening. Please tell me that I am right in assuming everything here:)

Misbah

View solution in original post

8 REPLIES8
nathan_rudman
Community Boss

Read it two times but I think I need a picture to get it:slightly_smiling_face:


Nathan Rudman, Anaplan Model Builder
ChrisAHeathcote
Community Boss

@nathan_rudman

Here is a walkthrough of what I am trying to achieve.

My source module;

ChrisHeathcote_0-1613377988239.png

ChrisHeathcote_1-1613378017456.png

ChrisHeathcote_3-1613378058103.png

Contains the following dimensions;

  • Time - Months (Future Years)
  • L4
  • Archive Period
  • LISS : OUT01

My target module;

ChrisHeathcote_4-1613378170666.png

ChrisHeathcote_6-1613378210265.png

ChrisHeathcote_8-1613378248947.png

Contains the following dimensions;

  • Time - Months (Future Years)
  • L4
  • Archive Periods
  • LISS : ARC Report Line Items

I have two mapping modules dimensioned by LISS : OUT01 which SUMs the source LISS into the target LISS and another dimensioned by Report Header ( the parent list of the Archive subset ) which maps the report headers in the source to the line items in the target.

When I use SUM for both mappings no data flows through and I receive no error. When I change the second SUM to a SELECT the correct data flows through and the report header ( Archive ) maps through to the correct line item in the target.

I can use SELECT to pull through all the relevant data and map this to a single line item.

However, WHY WILL THE SUM NOT WORK???

Chris
HeathcoteAndHerran.com
rob_marshall
Moderator

@ChrisAHeathcote

克里斯,我很难看到真正要什么g on, but if it works for a select but not a sum, you might want to consider creating a mapping module for the LISS. So, the target LISS, create a mapping module with a line item formatted as the other LISS, and then sum off that mapping module. See if that helps.

Rob

Misbah
Moderator

@ChrisAHeathcote

Are you saying both the SUM's don't work?. I see this as a typical use case of SUM & SELECT - reason being

In Source Module you have 5 dimensions

  1. L4
  2. Archive Period
  3. Future Year
  4. Archive
  5. LISS OUT01

In Target Module you have 4 dimensions

  1. L4
  2. Archive Period
  3. Future Year
  4. LISS ARC

Between these two modules 3 dimensions are common whereas 1 differ and another one is missing in the target module. The one which differs is LISS. In order to tackle this you already have a mapping module dimensioned by LISS OUT01 which has an attribute of LISS ARC and you are using SUM on that line item to pull the values- perfect

On the other hand the missing dimension in the target module (Archive list) can't be summed upon. However Anaplan will bring the totals automatically if it has top level set. Alternatively it can also be tackled with SELECT if you wish to pull the value of any specific list item.

This is what I believe is happening. Please tell me that I am right in assuming everything here:)

Misbah

ChrisAHeathcote
Community Boss

@Misbah

Yes, I believe you are correct and in this instance I went with SELECT().

But my main issue here is trying to understand why my SUM mapping did not work.

I was attempting to map Archive List ( subset of Report Header ) in the source to a line items in the target.

Using a system module for the Archive List I created a list formatted line item dimensioned by my target LISS.

This informed my SUM with is the Archive Report line item in the original second SUM.

I expected the data to flow but I received no error.

When I changed the SUM to SELECT() data pulled through successfully.

Just looking to understand why the first solution did not work. Is the fact that I am trying to map into line items the reason the SUM failed?

Chris

Chris
HeathcoteAndHerran.com
rob_marshall
Moderator

alexpavel
Certified Master Anaplanner

@MisbahNice catch!

I did not notice the 5th List in the source module... "Archive".

The assumption is that in the target module@ChrisAHeathcotewants to extract in the Target module only 1 Archive element at the time...

A solution to solve this with SUM is to use the values from the system module between丽丝OUT01和丽丝电弧的val“丽丝弧”ues only in correspondence of the Archive list desired to be extracted.

The steps are:

1. have in a system module without list the line-item formatted as "Archive" and choose the value of the Archive list that needs to be extracted in Target module

2. add a new line-item in the source module formatted asLISS ARC and with apply to only "LISS OUT01" and "Archive"

3. formula: if item(Archive)) = system module.Archive then mapping module.LISS ARC else blank

4. in Target module use in the SUM the line-item from source module ( point 3).

this is another way to solve SUM and SELECT....:slightly_smiling_face:

alexpavel_0-1613587016962.png

hope it helps...

alexpavel
Certified Master Anaplanner

@ChrisAHeathcotewhat you try to achieve should work.


The only particularity I see in the line-item subsets in these cases is that they do not return an error of not having a total root element.
So, if the mapping of the SUM: is not done correctly it is returned zero value, without any error warning. This could the reason why you do not receive any error, but also wrong results.

The only difference that I see between the source and target modules are the subsets lists "LISS : OUT01" and "LISS : ARC Report Line Items"

Can you share also the dimensionality of the "PR20 LISS:OUT01" module ? is it based on "LISS : OUT01" and the line-item 'LISS: ARCxx REPORT LINE ITEMS LIST" is formatted as "LISS : ARC Report Line Items" ?

Normally you would not need another SUM: other than for "LISS : ARC Report Line Items". to what list is related the "PROP15REPORT HEADER.'Archive report' line-item ?
What is the dimensionality of "PROP15REPORT HEADER" module ?