How to calculate within the list items to get the maximun of the items from the first to current?

litterbarbie
Contributor

How to calculate within the list items to get the maximun of the items from the first to current?

Hi everybody!

 

Need help to do the calcution within the list.

Here is a list with items(#1,#2,#3,...), and properties of Input and Output.

The Output is supposed to be the maximun value of the input from #1 to the current item as below table.

Anyone has solutions about this? I found it difficult to calculate list item dynamically.

NameInputOutput※How to calculate the Output
#12525=MAX(#1:#1)
#22025=MAX(#1:#2)
#33030=MAX(#1:#3)
#41030=MAX(#1:#4)
#54040=MAX(#1:#5)
#63040=MAX(#1:#6)
#72040=MAX(#1:#7)
#82540=MAX(#1:#8)
#91040=MAX(#1:#9)
7 REPLIES 7
rob_marshall
Moderator

@litterbarbie 

 

This looks fun...Let me ask you this, how many list members are you talking about, the 1-9 in your example?

litterbarbie
Contributor

#1~9 is just an example.^^
Actually the list have about 500,000 members and parent of about 100,000 members, e.g. 1 parent with 1~20 children.
And the calculation just need to do within the members under the same parent, as the example above you could image that the #1~9 have the same parent.
Please let me know if you need any further explanation on this.
rob_marshall
Moderator

@litterbarbie 

 

And you just want the Max number at the parent level?  Have you looked into the summary method of Max?

 

2022-07-15_09-47-55.png

litterbarbie
Contributor

I want the max value of the member which is within #1~current as example above which is used to adjust the input value.
litterbarbie
Contributor

@rob_marshall 

Thank you for kindly reply.

Here is another example.

If the List item have values like,

10, 15, 5, 20, 10, 30, 20, 25, 5

Then the results I want is,

10, 15, 15, 20, 20, 30, 30, 25, 5

These list items have the same parent but summary is no need and the calculation only has to be done on the child level.

 

Best regards!

rob_marshall
Moderator

@litterbarbie 

 

Can you do me/us a favor and show use a true sample of the List member as well as the code?  Is Time or Period part of it?

 

Rob

litterbarbie
Contributor

@rob_marshall 

Thank you for your reply!

 

We are still confirming the feasibility of this requirement.

Here is the test module (no time dimension), 'org' is input data, 'tobe' is what we want to calculate, and others are my tentative calculations, you can ignore them.

 

litterbarbie_0-1658187926245.png

litterbarbie_2-1658187972634.png

best regards,

Cecilia Ren