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
- :
- About fomula. col sum by customer name

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 17, 2012 11:13 PM
(2415 views)

Hello. Could you do me a faver?

I know how can I use FOMULA function to calculate sum of column .

Col Sum(:ASSY_IN_QTY)

Furthermore, I want to calculate **sum of column by cust (customer name)**

I want to make script more simply from your answer.

Thanks.

dt << New Column( "Col Sum by customer",

Numeric,

Continuous,

formula(

Col Sum(:ASSY_IN_QTY)

)

);

Solved! Go to Solution.

1 ACCEPTED SOLUTION

Accepted Solutions

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

May 19, 2012 11:42 AM
(4371 views)

Solution

Col Sum() can have optional By-arguments. In the formula editor select the first argument and click on the ^ button to reveal the placeholder and select a by-column.

In JSL it can look like this:

dt << New Column**(** "Col Sum by customer",

Numeric,

Continuous,

formula**(**

Col Sum**(**:ASSY_IN_QTY, :CUST**)**

**)**

**)**;

1 REPLY

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

May 19, 2012 11:42 AM
(4372 views)

Col Sum() can have optional By-arguments. In the formula editor select the first argument and click on the ^ button to reveal the placeholder and select a by-column.

In JSL it can look like this:

dt << New Column**(** "Col Sum by customer",

Numeric,

Continuous,

formula**(**

Col Sum**(**:ASSY_IN_QTY, :CUST**)**

**)**

**)**;