- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
How do I sum multiple columns using the formula window?
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
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: How do I sum multiple columns using the formula window?
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
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: How do I sum multiple columns using the formula window?
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: How do I sum multiple columns using the formula window?
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
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: How do I sum multiple columns using the formula window?
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