Calculate cumulative sum in a table using a formula?

Tags:
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #7994 Score: 0
    Jacob Sagrans
    Participant

    Is there an easy way to calculate a cumulative sum in a table in CODAP using a formula? I tried to do this but it wasn’t obvious to me how, so I ended up doing it manually. Here is a shared view link to the data I’m working with in CODAP (and I’m pasting a screenshot of the table below):  https://codap.concord.org/app/static/dg/en/cert/index.html#shared=https%3A%2F%2Fcfm-shared.concord.org%2F3kn2CTxBIKaaMohdc5D0%2Ffile.json. Thanks!

    Attachments:
    #7996
    Bill Finzer
    Keymaster

    Hello Jacob,

    I believe the formula shown in the attached screenshot shows what you need. Basically the formula says to take the current value of the attribute you are summing and add to it the previous value of the cumulative sum.

    The prev function does the trick. Worth noting is that the second argument of the prev function is the value to use if the attribute has no previous value.

    Bill

    #8005
    Jacob Sagrans
    Participant

    Thanks Bill, that worked perfectly for me! Happy Thanksgiving!

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.