turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- JMP User Community
- :
- Discussions
- :
- Discussions
- :
- How do I sum multiple columns using the formula wi...

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

May 21, 2015 12:10 PM
(7036 views)

I have a table with 100 or more columns and would like to easily sum them in another column. Best way to do so without making a formula A + B + C.....100 times

Solved! Go to Solution.

2 ACCEPTED SOLUTIONS

Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

May 21, 2015 1:34 PM
(11798 views)

Solution

If a dynamic formula is not crucial, the jsl script below should add a new static column with the row-wise sum of every numeric column in the data table.

dt = Current Data Table**()**;

dt << **New Column****(**"sum", numeric, values**(**V Sum**((**dt << **get as matrix****)**`**)))**;

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

May 21, 2015 2:14 PM
(11799 views)

Solution

You can also do this within the formula editor using the Sum() function.

Fill in the argument for the function by clicking on the first column that you want to sum, and then shift-click on the last.

-Jeff

-Jeff

2 REPLIES

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

May 21, 2015 1:34 PM
(11799 views)

If a dynamic formula is not crucial, the jsl script below should add a new static column with the row-wise sum of every numeric column in the data table.

dt = Current Data Table**()**;

dt << **New Column****(**"sum", numeric, values**(**V Sum**((**dt << **get as matrix****)**`**)))**;

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

May 21, 2015 2:14 PM
(11800 views)

You can also do this within the formula editor using the Sum() function.

Fill in the argument for the function by clicking on the first column that you want to sum, and then shift-click on the last.

-Jeff

-Jeff