Adding up a column or row numbers in a table

CODAP Forums CODAP Help Forum Adding up a column or row numbers in a table

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #7780 Score: 0

    Hi everyone,

    I am trying to add up a column or row numbers in a table, but I had no success. I would be very appreciative if someone helps. Thank you!

    Samet

    #7781
    Bill Finzer
    Keymaster

    Hello Samet,

    Adding up a column of numbers

    • Suppose your column has the attribute name Values. Then you can add a new column which you might name Sum of Values and give it the formula “sum(Values)”. This works but the whole column gets filled with identical results. This is illustrated in one of the enclosed screen captures.
    • But by dragging Sum of Values all the way to the left to create a higher level table the desired result appears just once and serves as an intuitive summary of the Values.

    Adding a row of numbers

    • As shown in the lefthand table of the Sales Report screen capture, writing a formula to add a relatively small number of values in a row is not much of problem. But it gets really cumbersome when there are a lot of columns with values to add because, unlike a spreadsheet, CODAP doesn’t have a built-in formula for doing it. But if you restructure the table (in spreadsheet land this would be a “pivot”) you can put the values you want to sum in a column, grouped by what started out as the row. The righthand table of the Sales Report screen capture shows the result. Now the formula doesn’t depend on the number of values to add.

    I hope this helps. Perhaps others have encountered this and have additional solutions?

    Bill

    p.s. CODAP has a builtin plugin, Transformers, that can automate the process of pivoting a CODAP table.

    • This reply was modified 1 year, 4 months ago by Bill Finzer.
    • This reply was modified 1 year, 4 months ago by Bill Finzer.
    #7785

    Thank you very much for reaching out, Bill!

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘CODAP Help Forum’ is closed to new topics and replies.