Subscribe Bookmark RSS Feed

About fomula. col sum by customer name

jameskim

Community Trekker

Joined:

May 17, 2012

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)

2037_Col sum.jpg

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)

)

);

1 ACCEPTED SOLUTION

Accepted Solutions
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
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)

)

);