Need help with summing up lists

Dear all,
I started with coda not to long ago and I have run into a problem - maybe you can help me?
I have two (or more) lists that I would like to sum up - like this

List (0,1,1,2,3,5)
List2 (1,2,2,3,5,7)

resulting in List3 (1,3,3,5,8,12)

Any ideas?

Best regards
Peter

@Peter_Tobisson

Thanks! What I forgot to mention though was that it might be N number of lists to sum up… :stuck_out_tongue:

Dear @Peter_Tobisson

First of all credits to @Ander

If you want to do it directly from the canvas, this should do the job:

Sequence(1,list1.Count(),1).FormulaMap(list1.Nth(CurrentValue) + List2.Nth(CurrentValue))  

:bulb:
You should name your lists, like I used "list1"and “list2”

1 Like

@Peter_Tobisson

I just added another list to that table. You can add as many as you want.

If that’s not what you want, then I don’t understand your question. Perhaps you could mock something up in a dummy doc to illustrate your desired end result

Dear @Peter_Tobisson,

You can add as many lists as you wish

Sequence(1,list1.Count(),1).FormulaMap(list1.Nth(CurrentValue) + List2.Nth(CurrentValue) + List3.Nth(CurrentValue) + List4.Nth(CurrentValue))

Dear all,
Thanks for you help. And credits to you @Jean_Pierre_Traets and @Ander for helping me out.
I’ve illustrated the problem in the embedded document. I hope I am not to lost…

I just can’t wrap my head around it (which is a shame, because I love the simplicity of Coda)

@Peter_Tobisson

One issue that’s likely to create problems for you using this approach is that your many various lists will be of different lengths. See the yellow columns here (continued below):

I suspect that there’s a better way to do what you’re trying to do, and one that’s also more scalable (I could be totally wrong about that).

I don’t currently have a project that tracks resource utilization, but there are some very sharp people in this community that do. If we could get one on the line to help you, that would be great.

In the meantime, I would encourage you to search the template gallery for templates that contain the types of functionality you require, and use them as conceptual guides: https://coda.io/templates

I’ll revisit this later today when I have more time to dig into it.

Dear @Peter_Tobisson,

With the method to filter out days that have more tasks in the below post, you should be able to get the days that have 2 or more tasks

with credits to @shishir

Just brainstorming, I assume you will need to find a way to set daily a percentage to be spend on a task when there is more than one tasks available, because you can’t do more than 100% / day :grinning:

As @Ander already mentioned, we have in this community great approaches and let’s wait if we get more input.

@Peter_Tobisson

Section 2 of this sample doc illustrates another approach. Maybe it will spark an idea that you can use for your business logic.

Dear @Ander,

Impressed how you managed to structure this subject :thought_balloon:

:bulb:A small minor thing:
In Duration2 the formula should be updated to include the last day
Duration((thisRow.end2+1)-thisRow.start2)

1 Like

Dear @Ander and @Jean_Pierre_Traets!
Thank you so much for your help. I am still very new to this great tool and I am just learning. I did manage to solve it somewhat different. The table actually calculates the total work effort for all projects that happen to run during the same time of a given project (ie it references back to itself). You would then assume that this work effort is distributed evenly…

Here is what I came up with (in swedish though)…

Have a good one!

Br
Peter

2 Likes